本文介绍了如何让NASM在MacOS的终端中作为命令工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在尝试让NASM在终端中作为命令工作,但似乎什么都不起作用。我一直收到错误:
nasm: error: unable to find utility "nasm", not a developer tool or in PATH
因此,首先,我尝试更新我的PATH变量。我尝试编辑PATH变量: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
我收到了相同的错误。接下来,我尝试使用自制软件安装NASM:
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
再一次,我收到了相同的错误。我很想最终弄清楚这件事。
推荐答案
以避免/usr/bin/nasm
在路径中首先被找到
$ /usr/local/bin/nasm
查找brew
安装的程序,或
alias nasm=/usr/local/bin/nasm
然后
$ nasm
这篇关于如何让NASM在MacOS的终端中作为命令工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!