1. autolibs 錯誤
轉載自(http://www.web520.cn/archives/3026)
這篇文章主要介紹ubuntu14.04安裝ruby-2.2.0出現的一些問題,文章内容主要包括關于ubuntu14.04,ruby-2.2.0,安裝,問題等,下面開始文章正文。
要安裝ruby,首先要安裝rvm,借助rvm安裝ruby
rvm 的全稱是 Ruby Version Manager ,是一款由 Wayne E. Seguin 開發的一款指令行工具。rvm 能夠讓你輕松的安裝、管理 ruby 生産力環境,諸如不同版本的解釋器和 gem 。
打開終端,輸入指令
curl -L get.rvm.io | bash -s stable
然後
echo “source ~/.bashrc” >> ~/.bash_profile
echo “source ~/.rvm/scripts/rvm” >> ~/.bashrc
source ~/.bashrc
rvm -v//檢視rvm版本
安裝rvm成功後,就可以安裝ruby了。
運作
rvm install 2.2.0
耐心等待ruby-2.2.0安裝完成,但是有時,安裝時會出現一些問題:
比如 ubuntu14.04系統,運作rvm install 2.2.0出現錯誤:
問題主要原因是 Ruby Rvm apt-get update 錯誤
錯誤代碼:
Error running ‘requirements_debian_update_system ruby-2.2.0’,
showing last 15 lines of /home/hww/.rvm/log/1411546866_ruby-2.2.0/update_system.log
++ case “ TERM:−dumb”in++case“ 1” in
++ [[ -t 2 ]]
++ return 1
++ printf %b ‘There has been error while updating ‘\”apt-get’\”, please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
\n’
There has been error while updating ‘apt-get’, please give it some time and try again later.
For 404 errors check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ return 100
Requirements installation failed with status: 100.
解決方案
在運作 rvm install 2.2.0 之前先運作
rvm autolibs disable
然後再運作
rvm install 2.2.0
問題應該能得到解決
有關ubuntu14.04安裝ruby-2.2.0出現的一些問題的文章就介紹到這兒,希望對大家有所幫助。
2. Libraries missing for ruby-2.2.0: libyaml-0.so.2
解決方法:
https://github.com/sstephenson/ruby-build/wiki
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev
進而建立好build 環境。應該不是build環境不對,因為下載下傳的是binary的。還是缺那個libyaml庫
3. 不能找到對應ruby或rails的版本
解決方法如圖:
