Reputation: 2204
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.
Upvotes: 8
Views: 9769
Reputation: 3580
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!
Upvotes: 0
Reputation: 257
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 =)
Upvotes: 1
Reputation: 5702
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
Upvotes: 1
Reputation: 5045
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 :) ).
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! :)
Upvotes: 0
Reputation: 11
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
Upvotes: 1
Reputation: 2016
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.
Upvotes: 19
Reputation: 1898
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 :)
Upvotes: 1
Reputation: 650
\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
Upvotes: 0
Reputation: 7225
run
sudo apt-get update
sudo apt-get install build-essential
and then try again.
Upvotes: 1