2013-04-23 95 views
2

我想安裝RVM以及Ruby 1.9.3和Rails 3.2.9。我試圖使用以下命令安裝rvm,RVM穩定版安裝錯誤

\ curl -L https://get.rvm.io | bash -s stable --rails --autolibs = enabled#或者--ruby = 1.9.3

但是,我收到以下錯誤。

Upgrade Notes: 


    * WARNING: You're using ~/.profile, make sure you load it, 
    add the following line to ~/.bash_profile if it exists 
    otherwise add it to ~/.bash_login: 

     source ~/.profile 

    * No new notes to display. 

# RVM: Shell scripts enabling management of multiple ruby environments. 
# RTFM: https://rvm.io/ 
# HELP: http://webchat.freenode.net/?channels=rvm (#rvm on irc.freenode.net) 
# Cheatsheet: http://cheat.errtheblog.com/s/rvm 
# Screencast: http://screencasts.org/episodes/how-to-use-rvm 

# In case of any issues run 'rvm requirements' or read 'rvm notes' 

Upgrade of RVM in /home/local/.rvm/ is complete. 

ajesh.co,TION 
# 
# Thank you for using RVM! 
# I sincerely hope that RVM helps to make your life easier and 
# more enjoyable!!! 
# 
# ~Wayne 


rvm 1.19.6 (stable) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> [https://rvm.io/] 

Searching for binary rubies, this might take some time. 
Installing requirements for ubuntu, might require sudo password. 
E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) 
E: Unable to lock directory /var/lib/apt/lists/ 

請幫忙。謝謝。 :) -

回答

0

軟件包未安裝,因爲apt-get在執行時被暫停,導致apt處於鎖定狀態。

就可以刪除與

​​

鎖定文件,你可能還需要刪除鎖定文件的緩存目錄

sudo rm /var/cache/apt/archives/lock 

後嘗試安裝命令再次

-1

使用以下步驟將得到解決方案:

1)sudo apt-get -y install curl 

2)curl -L get.rvm.io | bash -s stable 

3)source ~/.rvm/scripts/rvm 

4)sudo apt-get -y install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion 

5)rvm install 1.9.3-p374 

6)gem install rails -v 3.2.9