Install nmap on MacOS with Brew
brew install nmap
Link: https://formulae.brew.sh/formula/nmap
Errors
/usr/local/share/man/de/man1 is not writable.
Error: Could not symlink bin/ncat
Get errors details
brew link --overwrite nmap
Linking /usr/local/Cellar/nmap/7.92...
Error: Could not symlink share/man/de/man1/nmap.1
/usr/local/share/man/de/man1 is not writable.
nmap -p 3389 192.168.10.0/24
zsh: bad CPU type in executable: nmap
brew link nmap
Linking /usr/local/Cellar/nmap/7.92...
Error: Could not symlink bin/ncat
Target /usr/local/bin/ncat
already exists. You may want to remove it:
rm '/usr/local/bin/ncat'
To force the link and overwrite all conflicting files:
brew link --overwrite nmap
To list all files that would be deleted:
brew link --overwrite --dry-run nmap
brew link --overwrite nmap
Linking /usr/local/Cellar/nmap/7.92...
Error: Could not symlink share/man/de/man1/nmap.1
/usr/local/share/man/de/man1 is not writable.
Solutions
sudo rm -rf /usr/local/share/ncat
sudo rm /usr/local/share/ncat
sudo rm -rf /usr/local/share/man/de
sudo rm -rf /usr/local/share/man/es
sudo rm -rf /usr/local/share/man/fr
sudo rm -rf /usr/local/share/man/hr
sudo rm -rf /usr/local/share/man/it
sudo rm -rf /usr/local/share/man/hu
sudo rm -rf /usr/local/share/man/zh
sudo rm -rf /usr/local/share/man/ru
sudo rm -rf /usr/local/share/man/sk
sudo rm -rf /usr/local/share/man/ja
sudo rm -rf /usr/local/share/man/ro
sudo rm -rf /usr/local/share/man/pl
sudo rm -rf /usr/local/share/man/pt_BR
sudo rm -rf /usr/local/share/man/pt_PT
sudo rm -rf /usr/local/share/nmap/
brew link --overwrite nmap
nmap -V
Nmap version 7.92 ( https://nmap.org )
Platform: x86_64-apple-darwin19.6.0
Compiled with: nmap-liblua-5.3.5 openssl-1.1.1l nmap-libssh2-1.9.0 libz-1.2.11 nmap-libpcre-7.6 libpcap-1.9.1 nmap-libdnet-1.12 ipv6
Compiled without:
Available nsock engines: kqueue poll select