LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to install nmap and all of its dependencies on Ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-install-nmap-and-all-of-its-dependencies-on-ubuntu-937165/)

ljw 03-29-2012 05:57 PM

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) ...

evo2 03-30-2012 11:24 AM

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.

ukiuki 03-30-2012 11:25 AM

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

ljw 04-01-2012 08:36 AM

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.

TobiSGD 04-01-2012 08:48 AM

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?

evo2 04-01-2012 10:48 AM

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.

camorri 04-02-2012 08:48 AM

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 ).

ljw 04-07-2012 11:34 PM

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.


All times are GMT -5. The time now is 05:50 AM.