NMAP is not working

My set up is Hassbian 0.67.1

I am getting this error message:

nmap.nmap.PortScannerError: 'nmap program was not found in path. PATH is : /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

Tried to install nmap but I am getting this error:

sudo apt-get install nmap
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nmap : Depends: liblinear1 (>= 1.6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Please help.

Thanks.

What happens if you try to install liblinear1 manually? sudo apt-get install liblinear1

Also, did you run sudo apt-get update before trying to install anything? Something might have changed in the repositories.

Yes, I did run apt-get update.

Start again without running apt-get update to see if I still have the same issue.

Thanks.

Here is an update:

Image used : image_2018-03-16-Hassbian

After installing when the Hass web is available:

Run script to update Hassbian

$ sudo hassbian-config upgrade hassbian

add NMAP:

device_tracker:
  - platform: nmap_tracker
    hosts: 192.168.1.0/24

That is when I noticed the error.

Any suggestion ?

Try:

sudo apt-get install net-tools nmap

After running, this is the message:

pi@hassbian:/ $ sudo apt-get install net-tools nmap
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nmap : Depends: liblinear1 (>= 1.6) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

What do you get for “uname -a

@gamesor

Sorry, try “cat /etc/os-release

Here is the info:

Linux hassbian 4.14.34-v7+ #1110 SMP Mon Apr 16 15:18:51 BST 2018 armv7l GNU/Linux
pi@hassbian:/ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

Run the following one at a time, should help clear broken dependencies.
Make sure and STOP HA first.

  1. sudo apt-get update

  2. sudo apt-get -f install

  3. sudo apt --fix-broken install

Nothing for install or update:

pi@hassbian:/ $ sudo apt-get update
Get:1 http://archive.raspbian.org/raspbian jessie InRelease [14.9 kB]
Get:2 http://archive.raspberrypi.org/debian stretch InRelease [25.3 kB]  
Get:3 http://archive.raspbian.org/raspbian stretch InRelease [15.0 kB]          
Get:4 http://archive.raspbian.org/raspbian jessie/main armhf Packages [9,536 kB]                  
Get:5 http://archive.raspberrypi.org/debian stretch/main armhf Packages [145 kB]
Get:6 http://archive.raspbian.org/raspbian stretch/main Sources [9,715 kB]                                                                   
Fetched 19.5 MB in 19s (975 kB/s)                                                                                                            
Reading package lists... Done
pi@hassbian:/ $ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
pi@hassbian:/ $ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.```

arg, How do you feel about starting over?

see what’s installed: sudo nmap --version

Coolie,

I will try to start again.

Thanks for your help.

Did you check “sudo nmap --version