In this tutorial, we are going to install Zenmap in Linux Mint as well as run a quick scan to see if Zenmap is running properly in Linux Mint. This Zenmap installation guide applies to Ubuntu 20.x and higher as well as any other Ubuntu-based distribution out there.
The reason you’re most likely here is that you upgraded Linux Mint to the latest version or proceeded with a fresh install, just to realize that Zenmap is no longer available in Ubuntu repositories.
This is caused by Zenmap’s heavy reliance on Python 2.7 which was officially deprecated in January 2020. Consequently, Zenmap is no longer maintained upstream.
However, there is a way we can install the necessary Python 2 dependencies and get Zenmap back to live in Linux Mint 20.x and other Ubuntu-based distributions. And here’s the proof:
The whole installation process will require no longer than 10 minutes. So without further ado, let’s get our fingers busy.
- Update/upgrade Linux Mint
Use the following command to update/upgrade your operating system and type your password when prompted:
sudo apt update && sudo apt upgrade
- Install NMAP in Linux Mint 20.x
Zenmap is the official GUI for Nmap Security Scanner and though we all love Nmap’s vast command-line functionality, there are a few things like Nmap’s Topology that comes in handy for visualizing our scans.
To install Nmap in Linux Mint, open a terminal and run the following command, and press the Y key when prompted to proceed with the installation:
sudo apt install nmap
- Remove Alien if installed [Optional]
Alien is an application that converts various Linux packages [.rpm, .slp, .tgz, and Linux Standard Base] to Debian packages.
If you have Alien installed in your system [not installed by default in Linux Mint] we will need to uninstall Alien first and reinstall it later to make sure all dependencies are resolved correctly.
To uninstall Alien, type the following command in the terminal:
sudo apt remove alien
- Navigate to your Download folder
In the Terminal, navigate to the Downloads folder on your system by executing:
cd ~/Downloads
- Download the latest version of Alien by clicking HERE. Make sure you download Alien in the Downloads folder.
- Download Zenmap from Nmap package repository
To download the latest version of Zenmap in your Downloads folder on Linux Mint, by clicking here HERE.
This link will open Nmap’s package repository. Scroll down to the bottom of the page and click on the last Zenmap release.
- Download Python 2 dependencies in Linux Mint
Copy and paste the following commands in the terminal to download Zenmap Python 2 dependencies in your Downloads folder:
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
wget http://azure.archive.ubuntu.com/ubuntu/pool/universe/p/pygobject-2/python-gobject-2_2.28.6-14ubuntu1_amd64.de
wget http://security.ubuntu.com/ubuntu/pool/universe/p/pycairo/python-cairo_1.16.2-2ubuntu2_amd64.deb
At this point, you should have the following files in your Downloads folder:
- Install Python 2 dependencies in Linux Mint
Copy and paste the following commands in your terminal in the following order. Ignore any “unmet dependencies” error if it appears.
sudo dpkg -i python-gobject-2_2.28.6-14ubuntu1_amd64.deb
sudo dpkg -i python-cairo_1.16.2-2ubuntu2_amd64.deb
sudo dpkg -i python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
- Fix the Python 2 unmet dependencies – if any
Type the command below to fix the Python 2 broken dependencies that might have occurred in the previous step:
sudo apt --fix-broken install
- Install Alien in Linux Mint:
sudo dpkg -i alien<hit the Tab key to auto-complete>
11. Convert Zenmap
Now, let’s use Alien to convert the Zenmap .rpm package to .deb using the following command:
sudo alien zenmap<hit the Tab key to auto-complete>
12. Install Zenmap in Linux Mint
sudo dpkg -i zenmap<hit the Tab key to auto-complete>
13. Run Zenmap in Linux Mint
You may know that Zenmap requires you to be run as a root user to use it at its full potential. You can run Zenmap by executing the command below in your terminal:
sudo zenmap
Alternatively, you can run Zenmap from the Linux Mint menu, by typing Zenmap in the search box:
Testing Zenmap in Linux Mint
To test if Zenmap works properly in Linux Mint, launch the application and scan your own “localhost” or the IP 172.0.0.1
If you want to get on track fast with Zenmap I recommend you to start with HOW TO USE ZENMAP TO SCAN A NETWORK
Troubleshooting
If you receive the following error when trying to run a scan in Zenmap, most likely you skipped step 2 in this tutorial:
No such file or directory
This means that the nmap executable was not found in your system PATH, which is
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
Fix the error by running in the terminal the following command:
sudo apt install nmap
Conclusion
In this guide, we learned how to install Zenmap in Linux Mint as well as the Python 2 dependencies that were the primary reason why Zenmap is deprecated and no longer available on the Ubuntu repositories.
I hope you found this article useful. If so, help my little website grow and share this post on your social media, forums, or personal website. I highly appreciate it!
See you next time.
