[英]MacOS Mojave: Command not found even though I can see the path when I echo $PATH
I've installed a tool on my Mac (10.14 Mojave) called ovftool (it also comes installed with VMware Fusion).我在我的 Mac(10.14 Mojave)上安装了一个名为 ovftool 的工具(它还随 VMware Fusion 一起安装)。 It lives in my applications folder under
VMware OVF Tool
它位于
VMware OVF Tool
下的我的应用程序文件夹中
I've edited my /etc/paths
file and for good measure did the PATH=/Applications/VMware\\ OVF\\ Tool:$PATH
along with adding it to my bash profile.我已经编辑了我的
/etc/paths
文件,并且将PATH=/Applications/VMware\\ OVF\\ Tool:$PATH
添加到我的 bash 配置文件中。 Yet when I run the command ovftool
I get the command not found
message.然而,当我运行命令
ovftool
我收到了command not found
消息。 Am I missing something here, is there some other way to set a PATH that I'm not aware of?我在这里遗漏了什么,还有其他方法可以设置我不知道的 PATH 吗? This same exact path for this same tool has worked before on my machine.
这个相同工具的相同路径以前在我的机器上工作过。
EDIT: Here is the print out from my path_helper PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware\\ OVF\\ Tool/ovftool.app:/Applications/VMware\\ Fusion.app/Contents/Library/VMware\\ OVF\\ Tool/:/Applictions/VMware\\ Fusion.app/Contents/Library/VMware\\ OVF\\ Tool:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Applications/VMware\\ OVF\\ Tool"; export PATH;
编辑:这是我的 path_helper
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware\\ OVF\\ Tool/ovftool.app:/Applications/VMware\\ Fusion.app/Contents/Library/VMware\\ OVF\\ Tool/:/Applictions/VMware\\ Fusion.app/Contents/Library/VMware\\ OVF\\ Tool:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Applications/VMware\\ OVF\\ Tool"; export PATH;
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware\\ OVF\\ Tool/ovftool.app:/Applications/VMware\\ Fusion.app/Contents/Library/VMware\\ OVF\\ Tool/:/Applictions/VMware\\ Fusion.app/Contents/Library/VMware\\ OVF\\ Tool:/Applications/VMware Fusion.app/Contents/Public:/usr/local/go/bin:/Applications/VMware\\ OVF\\ Tool"; export PATH;
The path adjustment should be something like路径调整应该是这样的
export PATH=/Applications/VMware\\ OVF\\ Tool.app/Contents/MacOS:$PATH
Also double check the name of the executable you are launching.还要仔细检查您正在启动的可执行文件的名称。
ls /Applications/VMware\\ OVF\\ Tool.app/Contents/MacOS
您可以 CD 进入该文件夹并使用 ./ovftool 运行它,至少作为解决方法。
用这个 :
export PATH=/Applications/VMware\ Fusion.app/Contents/Library/VMware\ OVF\ Tool/:$PATH
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.