rbenv install - executable host ruby is required

我只是一个虾纸丫 提交于 2019-12-02 03:44:05

问题


I am trying to install ruby 2.2.0-dev using rbenv into my Ubuntu 13.10 development laptop. I have removed all previous ruby and gem installations. Now, when I try to install ruby I get the following error.

mark@Inspiron-1564:~/.rbenv$ rbenv install 2.2.0-dev
Cloning https://github.com/ruby/ruby.git...
Installing ruby-2.2.0-dev...

BUILD FAILED

Inspect or clean up the working tree at /tmp/ruby-build.20140119161217.4141
Results logged to /tmp/ruby-build.20140119161217.4141.log

Last 10 log lines:
/tmp/ruby-build.20140119161217.4141 ~/.rbenv
Cloning into 'ruby-2.2.0-dev'...
Checking connectivity... done
/tmp/ruby-build.20140119161217.4141/ruby-2.2.0-dev /tmp/ruby-build.20140119161217.4141 ~/.rbenv
executable host ruby is required. use --with-baseruby option.; false -C ./tool get-config_files config.guess
executable host ruby is required. use --with-baseruby option.; false -C ./tool get-config_files config.sub
configure: error: cannot run /bin/bash tool/config.sub

回答1:


You can't use rbenv without a native installation of ruby in the machine. You should install ubuntu's ruby (sudo apt-get install ruby) so rbenv will have a base version to work with. If you can run ruby -v then you're all set.




回答2:


tl;dr

you need a non-dev version (i.e. 2.2.0) installed (also using rbenv) before you can have the dev version.


As of rbenv 1.0.0 you don't need to have ruby from the repository (e.g. using apt-get) installed on your machine to be have any *-dev version installed. However, it is required to have a non-dev version already installed (through rbenv) before installing any *-dev version.



来源:https://stackoverflow.com/questions/21214384/rbenv-install-executable-host-ruby-is-required

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!