[英]rbenv install gives “: No such file or directory” on ubuntu 14.04
Apologia 精神病
This seems like a pretty obvious problem...and I'm sure it's a duplicate...I've actually searched around my filesystem and the web for this, but haven't yet come across an answer for "rbenv" itself. 这似乎是一个非常明显的问题……而且我确信这是重复的……我实际上已经在我的文件系统和网络中进行搜索,但是还没有找到“ rbenv”本身的答案。
Context 语境
I tried to install rbenv on my ubuntu 14.04 machine per this link: https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-14-04 我试图通过以下链接在我的ubuntu 14.04机器上安装rbenv: https ://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-with-rbenv-on-ubuntu-14- 04
cd
git clone git://github.com/sstephenson/rbenv.git .rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
git clone git://github.com/sstephenson/ruby-build.git ~/.rbenv/plugins/ruby-build
echo 'export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
Problem 问题
When .bashrc runs ~/.rbenv/bin/rbenv ,it gets this error: 当.bashrc运行〜/ .rbenv / bin / rbenv时,出现以下错误:
: No such file or directory
I get the same error when I run it directly: 当我直接运行它时,我得到相同的错误:
~/.rbenv$ rbenv init -
Checked this 检查了这个
I've checked the script; 我已经检查了脚本; the first line "#!/usr/bin/env bash" looks ok.
第一行“#!/ usr / bin / env bash”看起来还可以。
However, I'm not sure at what point it's failing. 但是,我不确定它在什么时候失败了。 Short of adding a bunch of "echo's" to the script, I didn't have an easy way to debug it.
除了在脚本中添加一堆“ echo”之外,我没有一种简单的方法对其进行调试。
Thanks in advance 提前致谢
Is it possible that you cloned the repo to somewhere other than ~/.rbenv? 您是否有可能将存储库克隆到〜/ .rbenv以外的其他位置?
git clone git://github.com/sstephenson/rbenv.git .rbenv
should be git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
git clone git://github.com/sstephenson/rbenv.git .rbenv
应该是git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.