8

I am trying to install RVM on my Ubuntu machine.

I have used curl to get RVM, but some RVM commands (install, requirements) throw this apt-get error:

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

type rvm | head -1 returns

rvm is a function
-bash: type: write error: Broken pipe

which gem

/usr/bin/gem

I have checked the "Run command as a login shell" option

Steps followed from this tutorial:

sudo apt-get install curl
curl -L get.rvm.io | bash -s stable --auto
. ~/.bash_profile
rvm requirements - doesn't work properly

I have also looked at the official RVM documentation, but it seems to be very similar.

Any ideas?

UPDATE: I managed to do it. I disabled all the third party ppa URLs and it installed smoothly.

7
  • what are the steps you performed,put here. May 18, 2013 at 17:08
  • I followed this tutorial. I got stuck at rvm requirements.
    – Sebastian
    May 18, 2013 at 17:12
  • mentioned the link in your question. May 18, 2013 at 17:23
  • getting exactly same problem :(
    – Tarun
    Jun 21, 2013 at 15:59
  • @NinjaTurtle I installed "Sublime text", may be my sources.list file changed that time. Did you do same?
    – Tarun
    Jun 22, 2013 at 4:19

9 Answers 9

19
+25

There are some important packages your system needs before install rvm. Run at the terminal:

sudo apt-get install build-essential openssl libreadline6 libreadline6-dev \
curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev \
sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake \
libtool bison subversion nodejs

Then install rvm with:

curl -L https://get.rvm.io | bash -s stable --ruby

Now you need to put a setting in your .bashrc to add rvm to PATH for scripting. Run:

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"' >> ~/.bashrc

Open a new terminal and test rvm.

2
  • Sorry.. I just feel this answer though solves the OP's issue, it does not create a better world by explaining what issues each of the steps are solving. In short, I would like why's to be added as well. Jul 4, 2014 at 8:53
  • Yes this works, but there should be an additional flag that takes care of the dependencies for you, as is the case with most other applications. Jul 11, 2014 at 23:13
1

run

sudo apt-get update

sudo apt-get install build-essential

and then try again.

3
  • run this in your terminal and try again "source ~/.rvm/scripts/rvm" May 18, 2013 at 18:19
  • @SachinSingh probably it would be good,if you post the step by step installation process, what you did for your own installation. May 18, 2013 at 18:35
  • 1
    i recommend rvm installation through rvm website. after installing rvm add this line to very end of .bashrc file [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" and close all terminals and open and try again. May 18, 2013 at 18:45
1

Hye Guys!!

I got the solution. Actually error is because the information we need for installation is not available at sever define for software & update. I change it to from my local "Server from India" (In my case) to "Main Server".

It's working perfectly for me now :)

1

I was having the same problem with my install, and then I fully read the details that terminal left once the install was finished.

Try using source /usr/local/rvm/scripts/rvm

Once I did that, the function type rvm | head -1 returned rvm is a function

1

In my Case i fixed the error by:

rvmsudo rvm install 1.9.3

rvm --default 1.9.3

rvmsudo rvm remove 1.9.3

rvm install 1.9.3

Source

1

Try disabling repository which appear at 404 sudo apt-get update or viewing logs rvm. The fact is that when you install rvm is trying to update a list of your packages and if you have 404 to go to bed =)

0

\curl -L https://get.rvm.io | bash -s stable --ruby . paste this in your terminal window.I used this.It worked for me.for RVM for ruby \curl -L https://get.rvm.io | bash -s stable --rails . Use these to install RVM with ruby on rails

0

For people that know nothing about Linux or are newbies to Linux (like me) those are steps how to solve this (explanation, that was given above, was not that clear for me :) ).

  1. Go to Package Manager, tab Settings, Preferences
  2. In the opened window you'll see Other Software tab or something like that with links to servers. In my case one of these (it's mentioned in the error log that was produced by rvm) was causing errors and was not available (404 errors). I just unchecked it.
  3. run rmv dependencies only when you closed Package Manager, or you'll get error saying that something is locked at the moment.

And everything now is installed successfully! :)

0

The most common symptom of this problem occurs (as seth2810 hinted at) with non-zero exit codes from an apt-get update command, which rvm requirements expects. You should run this command yourself (with sudo) and check for any problems.

If you have 404s in the output, check that the package sources for the bad URLs are still correct/current. You can remove package sources more easily with sudo apt-get install software-properties-common, followed by sudo add-apt-repository --remove {URL_OF_PROBLEM_PACKAGE_SOURCE} for each failed url.

If you have something hinting at packages with 'unmet dependencies', try sudo apt-get -f install. This command attempts to fix incomplete installs by fetching missing packages and works most of the time. Otherwise... by this point you probably have a more specific error to google for anyway!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.