-bash:/ usr/local/bin/heroku:/ usr/local/bin/ruby​​:bad interpreter:没有这样的文件或目录

Kyl*_*cot 10 ruby bash heroku

每当我打开一个新的终端窗口时,我现在得到:

-bash: /usr/local/bin/heroku: /usr/local/bin/ruby: bad interpreter: No such file or directory

任何想法为什么会发生这种情况以及如何摆脱它?

cho*_*own 14

确保文件的第一行/usr/local/bin/heroku#!/path/to/ruby.您可能需要将其更改/usr/local/bin/ruby/usr/bin/ruby,或者如果找不到ruby可执行文件,请键入which rubyupdatedb && locate ruby查找它.


如果以上不起作用......

检查~/.bashrc,~/.inputrc~,/etc/bashrc,/etc/inputrc,/etc/profile用于线路试图执行/usr/local/bin/heroku.

另一个想法是你可能将它作为你的一个启动程序./etc/inittab办理登机手续/usr/local/bin/heroku.

如果您仍然无法在任何这些文件中找到该行,则可以运行 grep -iH heroku /*