MacOS – -bash: /usr/local/bin/nmap: Bad CPU type in executable

bashcatalinahomebrewmacosterminal

I recently update my Mac OS to Catalina 10.15.

I ran nmap I kept getting

-bash: /usr/local/bin/nmap: Bad CPU type in executable


I've tried reinstalling it

brew uninstall nmap
brew install nmap

but I see no effect, I even try full path

⚡️  Desktop  which nmap 
/usr/local/bin/nmap
⚡️  Desktop  /usr/local/bin/nmap
-bash: /usr/local/bin/nmap: Bad CPU type in executable
⚡️  Desktop

Best Answer

I decided to go the site :

https://nmap.org/book/inst-macosx.html

enter image description here

Click on Download

https://nmap.org/dist/nmap-7.80.dmg

I downloaded that .dmg, installed it, now my nmap working again.

enter image description here

Note : I will leave this post since, it might help others in the future.