LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 03-29-2012, 05:57 PM   #1
ljw
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Rep: Reputation: Disabled
Question How to install nmap and all of its dependencies on Ubuntu


Hello everyone! I have a question. I do not know how to install nmap and all of its dependencies on Ubuntu. As far as I know, we can use the command
"# pkgutil i nmap nmap" to install nmap and all of its dependencies on Solaris, however this command is not available on Ubuntu. So I tried to use "sudo apt-get install nmap". It seems that nmap and all of its dependencies have not been installed successfully. Because I did not get lots of lines printing out and periodically asking me to enter all or y. I did not see lots of lines that start with Fetching.... Also I tried to scan a specific machine for open ports. (e.g. # nmap v 130.127.49.226 > filename2 2> errorfilename &). I have re-directed output, both standard out and standard error, to files and executed the program in the background. When I check the two files, I found that they were empty. I do not know why. After I input the command "sudo apt-get install nmap", the following lines were displayed on the terminal. I am a beginner of learning Linux. I am looking forward to your reply. Thank you very much!

user@cpsc420620-desktop:~$ sudo apt-get install nmap
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-2.6.24-19-generic seamonkey-mailnews linux-headers-2.6.24-19
Use 'apt-get autoremove' to remove them.
The following NEW packages will be installed:
nmap
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1013kB of archives.
After this operation, 3506kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com hardy/main nmap 4.53-3 [1013kB]
Fetched 1013kB in 1s (701kB/s)
Selecting previously deselected package nmap.
(Reading database ... 141330 files and directories currently installed.)
Unpacking nmap (from .../archives/nmap_4.53-3_i386.deb) ...
Setting up nmap (4.53-3) ...
 
Old 03-30-2012, 11:24 AM   #2
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,106

Rep: Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102
Hi,

from the output you pasted in to your post it seems you have now successfully installed nmap using apt-get. That's great. Do you have any outstanding problems?

Evo2.
 
1 members found this post helpful.
Old 03-30-2012, 11:25 AM   #3
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,026

Rep: Reputation: 350Reputation: 350Reputation: 350Reputation: 350
Which version of Ubuntu are you using? And why do you want nmap? If you can't get it installed then looks like you won't be able to really use it, by the way it is a tool for security administrators/experts if you ain't one of those you probably don't need it.

Regards
 
1 members found this post helpful.
Old 04-01-2012, 08:36 AM   #4
ljw
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank both of you very much! The version of the Ubuntu that I use is Ubuntu 8.04. I doubt nmap and all of its dependencies have been installed successfully. Because I tried to scan a specific machine for open ports(e.g. # nmap –v 130.127.49.226 > filename2 2> errorfilename &). I have re-directed output, both standard out and standard error, to files and executed the program in the background. When I check the two files, I found that they were empty files. It is different from Solaris 10 system. After I installed the CSWpkgutil and namp and nmap using the following commands on Solaris 10.
# pkgadd -d http://get.opencsw.org/new
# PATH=$PATH:/opt/csw/bin
# pkgutil -i nmap
I scanned a specific machine for open ports using the command "# nmap –v 130.127.49.226 > filename2 2> errorfilename &". And I got two files called filename2 and errorfilename, respectively. Unlike the two files that I got on Ubuntu, they are not empty files. I do not know why. That's why I doubt nmap and all of its dependencies have been installed successfully.
 
Old 04-01-2012, 08:48 AM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,438
Blog Entries: 2

Rep: Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001Reputation: 4001
At first, Ubuntu 8.04 is out of date and unsupported, at least the desktop version. Install a supported distro.
Have you tried to use nmap with redirections? What output do you get in that case?
 
1 members found this post helpful.
Old 04-01-2012, 10:48 AM   #6
evo2
Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Debian, SL
Posts: 5,106

Rep: Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102Reputation: 1102
Hi,

as TobiSGD says Ubuntu 8.04 is unsupported, you should probably upgrade to 10.04.
This aside you can find out if nmap is really installed you can run the following.
Code:
dpkg -l nmap
Please run that and then post the output here.

Also of interest is the output of
Code:
dpkg --audit
Evo2.
 
1 members found this post helpful.
Old 04-02-2012, 08:48 AM   #7
camorri
Senior Member
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.0 + 14.1
Posts: 4,834

Rep: Reputation: 431Reputation: 431Reputation: 431Reputation: 431Reputation: 431
If you like gui's, install zenmap, it is a graphical front end for nmap. On my system it installed two buttons, one to launch nmap as a regular user, and one as root user. ( You have to enter the root password ).
 
1 members found this post helpful.
Old 04-07-2012, 11:34 PM   #8
ljw
LQ Newbie
 
Registered: Mar 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Thank all of you very much! I have figured out the problem. The command "sudo apt-get install nmap" can be used to install nmap and all of its dependencies. I made a mistake. I should use the command "# nmap –A –T4 130.127.49.226 > filename2 2> errorfilename" to scan a specific machine for open ports. After executing this command, I got two files filename2 and errorfilename.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
nmap ? how do i do nmap in linux ? command not found abbasakhtar Linux - Newbie 2 01-02-2011 01:08 AM
LXer: Learn how to use nmap, and nmap GUI, a great port scan tool LXer Syndicated Linux News 0 01-03-2008 09:10 AM
nmap increase send delay for nmap 4.20 matters Slackware 1 10-01-2007 11:37 PM
Ubuntu dapper wont install dependencies doralsoral Linux - Software 1 04-17-2006 03:28 PM
nmap for Ubuntu czechknight93 Ubuntu 8 08-17-2005 05:17 PM


All times are GMT -5. The time now is 04:14 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration