I’m sure many of us have installed nmap straight from the Ubuntu repositories.
After running a couple of network scans you noticed it spitting out ugly Script Engine runtime errors. You can temporarily get rid of these errors by disabling the script scan but it requires more work to fix this bug.
I’ve searched online and found that I wasn’t the only person annoyed with this problem. Nmap in the Ubuntu repository is messed up right now. You can view the launchpad thread here. There is a minor revision fix that a user has supplied in a debdiff. What I’m going to show you here is a combination of two things, resolving the nmap script engine runtime error in Ubuntu and also install a debdiff file in Ubuntu. Most of these instructions are derived from Ubuntu wiki.
First step is to install the necessary tools for building packages. Use this command in Ubuntu if you’ve never built a package before:
sudo apt-get install build-essential fakeroot devscripts
From your /tmp directory I would create a temporary staging directory for nmap:
mkdir nmap
and enter that directory,
cd nmap
then you download the debdiff file from launchpad into the nmap directory we just created:
wget http://launchpadlibrarian.net/21515655/nmap_4.76-0ubuntu2.dsc.debdiff
From here we will download the source code for nmap from the Ubuntu repository,
sudo apt-get source nmap
Then type in this command after you’ve downloaded the source code for nmap:
sudo apt-get build-dep nmap
Now this is where we start adding the changes in the debdiff file.
Enter this command:
cd nmap-*
The asterisk will be dependent on the version of nmap you are working with in Ubuntu. In my case the folder I was changing directories was nmap-4.76
This command will patch the debdiff to the source,
patch p1 < ../nmap_*.debdiff
Now read carefully. After the < ../ You will have to type in the debdiff file here. In my case I am using < ../nmap_4.76-0ubuntu5.debdiff
After that step we will build the the new source package,
sudo debuild -uc -us
Finally, we install the package:
sudo dkpg -i ../nmap_4.76-0ubuntu5_i386.deb
Note that the deb package will be dependent on your version number so please change accordingly.
Here’s an example for my nmap_4.76 installation:
sudo apt-get install fakeroot devscripts mkdir nmap cd nmap wget http://launchpadlibrarian.net/21515655/nmap_4.76-0ubuntu2.dsc.debdiff sudo apt-get source nmap sudo apt-get build-dep nmap cd nmap-4.76 patch p1 < ../nmap_4.76-0ubuntu5.debdiff sudo debuild -uc -us sudo dkpg -i ../nmap_4.76-0ubuntu5_i386.deb
Related posts:
- How To Install GNS3 in Ubuntu 9.04
- How To Install Adobe Air in Ubuntu
- Ubuntu Notification System Tray Gone
