I have been trying to get nasm to work as a command in terminal, but nothing seems to be working. I just keep getting the error:
nasm: error: unable to find utility "nasm", not a developer tool or in PATH
So, first, I tried updating my PATH variable. I tried editing the PATH variable:
safecrackers-MacBook-Pro-2:Library safecracker$ export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Libraries/nasm-2.14/
safecrackers-MacBook-Pro-2:Library safecracker$ nasm
nasm: error: unable to find utility "nasm", not a developer tool or in PATH
safecrackers-MacBook-Pro-2:Library safecracker$ echo $PATH
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Libraries/nasm-2.14/
safecrackers-MacBook-Pro-2:Library safecracker$ cd /Library/Libraries/nasm-2.14/
safecrackers-MacBook-Pro-2:nasm-2.14 safecracker$ ls
LICENSE man1 ndisasm rdf2ihx rdfdump
README nasm rdf2bin rdf2ith rdflib
ldrdf nasmdoc.pdf rdf2com rdf2srec rdx
I got the same error. Next, I tried installing nasm with homebrew:
safecrackers-MacBook-Pro-2:~ safecracker$ brew reinstall nasm
==> Reinstalling nasm
==> Downloading https://homebrew.bintray.com/bottles/nasm-2.14.02.mojave.bottle.tar.gz
Already downloaded: /Users/safecracker/Library/Caches/Homebrew/downloads/8581149c56e4f6aa40f6c17f75921aeec141f01373082bda3c7c8afa5cf5fbd5--nasm-2.14.02.mojave.bottle.tar.gz
==> Pouring nasm-2.14.02.mojave.bottle.tar.gz
🍺 /usr/local/Cellar/nasm/2.14.02: 30 files, 2.7MB
safecrackers-MacBook-Pro-2:~ safecracker$ nasm
nasm: error: unable to find utility "nasm", not a developer tool or in PATH
Again, I got the same error. I would love to finally figure this out.
Most tutorials for nasm are written with Linux in mind, so you'll usually need to make a few adjustments to get things working on macOS. NASM Hello World for x86 and x86_64 Intel Mac OS is a great place to start, and the NASM Tutorial a great place to go from there (see section 'Using NASM on macOS').
In the Terminal app on your Mac, press the Up Arrow key. The last command you entered appears on the command line. Continue pressing the Up Arrow key until you see the command you want, then press Return.
The command line interface (CLI), or the language that you type into Terminal to interact with your Mac, is called bash.
To avoid /usr/bin/nasm
be found first in PATH use
$ /usr/local/bin/nasm
to find the one installed by brew
, or
alias nasm=/usr/local/bin/nasm
and then
$ nasm
I have solved this problem by:
brew reinstall nasm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With