Install nmap 6 on Debian or Ubuntu Linux

By | 2012/05/22

nmap 6 is out! It will be a couple of centuries before this is available in Debian, so I’ll show you how to easily create a .deb package right now. The following steps will provide a .deb package which is easy to cleanly uninstall at anytime as needed.

Updated 19 June 2012!

1. First install some needed packages:

$ sudo apt-get install build-essential libssl-dev libpathfinder-openssl-1 liblinear-dev libpcap0.8-dev libpcre3-dev checkinstall

2. Next, grab the latest nmap tarball from

$ wget

3. Extract:

$ tar xvf nmap-6.01.tar.bz2

4. Change to the nmap directory we extracted:

$ cd nmap-6.01/

5. Configure:

$ ./configure


$ make


$ sudo checkinstall

(When prompted, default values here are ok if the deb is only for your own use.)

$ sudo checkinstall
[sudo] password for stmiller: 

checkinstall 1.6.2, Copyright 2009 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.

The package documentation directory ./doc-pak does not exist. 
Should I create a default set of package docs?  [y]: y

Preparing package documentation...OK

Please write a description for the package.
End your description with an empty line or EOF.
>> nmap

**** Debian package creation selected ***

This package will be built according to these values: 

0 -  Maintainer: [ root@brahms ]
1 -  Summary: [ nmap ]
2 -  Name:    [ nmap ]
3 -  Version: [ 6.01 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ nmap-6.01 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ nmap ]
12 - Conflicts: [  ]
13 - Replaces: [  ]

Enter a number to change any of them or press ENTER to continue: 

Installing with make install...

========================= Installation results ===========================
/usr/bin/install -c -d /usr/local/bin /usr/local/share/man/man1 /usr/local/share/nmap
/usr/bin/install -c -c -m 755 nmap /usr/local/bin/nmap
/usr/bin/strip -x /usr/local/bin/nmap
/usr/bin/install -c -c -m 644 docs/nmap.1 /usr/local/share/man/man1/
if [ "yes" = "yes" ]; then \
	  for ll in de es fr hr hu it jp pl pt_BR pt_PT ro ru sk zh; do \
	    /usr/bin/install -c -d /usr/local/share/man/$ll/man1; \
	    /usr/bin/install -c -c -m 644 docs/man-xlate/nmap-$ll.1 /usr/local/share/man/$ll/man1/nmap.1; \
	  done; \
/usr/bin/install -c -c -m 644 docs/nmap.xsl /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 docs/nmap.dtd /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 nmap-services /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 nmap-payloads /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 nmap-rpc /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 nmap-os-db /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 nmap-service-probes /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 nmap-protocols /usr/local/share/nmap/
/usr/bin/install -c -c -m 644 nmap-mac-prefixes /usr/local/share/nmap/
/usr/bin/install -c -d /usr/local/bin /usr/local/share/man/man1
cd zenmap && /usr/bin/python --quiet install --prefix "/usr/local" --force 
/usr/bin/install -c -c -m 644 docs/zenmap.1 /usr/local/share/man/man1/
if [ ! -f /usr/local/bin/nmapfe -o -L /usr/local/bin/nmapfe ]; then \
		ln -sf zenmap /usr/local/bin/nmapfe; \
ln -sf zenmap /usr/local/bin/xnmap
make[1]: Entering directory `/home/stmiller/Downloads/build/nmap-6.00/ncat'
Installing Ncat
../shtool mkdir -f -p -m 755 /usr/local/bin /usr/local/share/man/man1
/usr/bin/install -c -c -m 755 ncat /usr/local/bin/ncat
/usr/bin/strip -x /usr/local/bin/ncat
if [ -n "certs/ca-bundle.crt" ]; then \
		../shtool mkdir -f -p -m 755 /usr/local/share/ncat; \
		/usr/bin/install -c -c -m 644 certs/ca-bundle.crt /usr/local/share/ncat/; \
/usr/bin/install -c -c -m 644 docs/ncat.1 /usr/local/share/man/man1/ncat.1
make[1]: Leaving directory `/home/stmiller/Downloads/build/nmap-6.00/ncat'
cd ndiff && /usr/bin/python install --prefix "/usr/local" 
running install
running build
running build_scripts
running install_scripts
copying build/scripts-2.7/ndiff -> /usr/local/bin
changing mode of /usr/local/bin/ndiff to 755
running install_data
copying docs/ndiff.1 -> /usr/local/share/man/man1
running install_egg_info
make[1]: Entering directory `/home/stmiller/Downloads/build/nmap-6.00/nping'
/usr/bin/install -c -d /usr/local/bin /usr/local/share/man/man1
/usr/bin/install -c -c -m 755 nping /usr/local/bin/nping
/usr/bin/strip -x /usr/local/bin/nping
/usr/bin/install -c -c -m 644 docs/nping.1 /usr/local/share/man/man1/
make[1]: Leaving directory `/home/stmiller/Downloads/build/nmap-6.00/nping'

======================== Installation successful ==========================

Copying documentation directory...

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

Installing Debian package...OK

Erasing temporary files...OK

Writing backup package...OK

Deleting temp dir...OK


 Done. The new package has been installed and saved to


 You can remove it from your system anytime using: 

      dpkg -r nmap



$ nmap -V

Nmap version 6.01 ( )
Platform: x86_64-unknown-linux-gnu
Compiled with: nmap-liblua-5.1.3 openssl-1.0.0h nmap-libpcre-8.12 nmap-libpcap-1.2.1 nmap-libdnet-1.12 ipv6
Compiled without: 

Hack on,