可执行文件不从PATH变量中搜索

时间:2015-10-06 05:04:02

标签: macos bash go grafana

我正在尝试在我的MAC上构建grafana。我安装了go二进制文件并更新了PATH变量.Below是bash的输出

bash-3.2$ echo $PATH /Users/kartl/Projects/mongodb/bin/:/usr/local/go/bin/go:/usr/local/sbin:/Users/kartl/.npm-packages/bin:/Users/kartl/Projects/mongodb/bin/:/usr/local/sbin:/Users/kartl/.npm-packages/bin:/Users/kartl/Projects/mongodb/bin/:/usr/local/sbin:/Users/kartl/.npm-packages/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/git/bin:/usr/local/bin/jamf

但是当我尝试运行一些go命令进行安装时,我会遇到错误。

/Users/kartl/Projects/grafana/bin/godep  restore 
godep: restore: exec: "go": executable file not found in $PATH
godep: restore: exec: "go": executable file not found in $PATH
godep: restore: exec: "go": executable file not found in $PATH

有人可以帮助我,为什么会发生这种情况?

1 个答案:

答案 0 :(得分:2)

/usr/local/go/bin/go /usr/local/go/bin不应该rental_car_cost? PATH变量中的项应该是包含可执行文件的目录,而不是可执行文件本身。