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 
⚡️  Desktop  /usr/local/bin/nmap
-bash: /usr/local/bin/nmap: Bad CPU type in executable
⚡️  Desktop
  • 3
    What's the result of file /usr/local/bin/nmap? Get the 64bit version if you detect a Mach-O executable i386.
    – klanomath
    Commented Jan 17, 2020 at 2:47
  • @klanomath : I ran the command above, I got this /usr/local/bin/nmap: Mach-O 64-bit executable x86_64
    – code-8
    Commented Jan 17, 2020 at 2:51
  • 1
    If you think brew is the issue, try brew reinstall --verbose nmap and are you sure you don’t have another binary in your $PATH
    – bmike
    Commented Jan 17, 2020 at 2:56
  • 1
    Thank-you guys for your willingness to help .
    – code-8
    Commented Jan 17, 2020 at 2:57
  • 1
    Awesome! Ask again if you need more help with other brew
    – bmike
    Commented Jan 17, 2020 at 2:57

2 Answers 2


I decided to go the site :


enter image description here

Click on Download


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.

  • thank you for this answer! side question: after updating to 10.15, i had issues with python and now nmap.... does anyone know why in general these issues are being caused? is 10.15 breaking almost everything for devs?
    – greenhouse
    Commented Jun 3, 2020 at 18:18
  • You’re welcome. Please ask and add details.
    – code-8
    Commented Jun 3, 2020 at 18:25
  • Installing the latest version worked for me as well. Thanks Commented Jun 14, 2023 at 4:49

You may find this to be an x86 (32bit) vs x64 problem, thus a new version will be required.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .