Runtime RVM Ruby Update Error

When I try to install something using RVM, I get the following error:

Searching for binary rubies, this might take some time. Found remote file https://rvm.io/binaries/ubuntu/13.04/x86_64/ruby-2.1.1.tar.bz2 Checking requirements for ubuntu. Installing requirements for ubuntu. Updating system..kshitiz password required for 'apt-get --quiet --yes update': ............................ Error running 'requirements_debian_update_system ruby-2.1.1', showing last 15 lines of /home/kshitiz/.rvm/log/1400047196_ruby-2.1.1/update_system.log ++ /scripts/functions/logging : rvm_pretty_print() 78 > case "${TERM:-dumb}" in ++ /scripts/functions/logging : rvm_pretty_print() 81 > case "$1" in ++ /scripts/functions/logging : rvm_pretty_print() 83 > [[ -t 2 ]] ++ /scripts/functions/logging : rvm_pretty_print() 83 > return 1 ++ /scripts/functions/logging : rvm_error() 117 > 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 ++ /scripts/functions/requirements/ubuntu : requirements_debian_update_system() 53 > return 100 Requirements installation failed with status: 100. 

How can i fix this?

+44
ruby rvm
May 14 '14 at 9:42
source share
14 answers

RVM does not work very well if apt-get update has errors. If your apt sources has an invalid repository that gives a 404 or GPG error, RVM will refuse to work. This can be confusing because it happens even if the defective repository has nothing to do with ruby or RVM .

The following fix worked for me (Ubuntu):

Run apt-get update and see if there are any errors. Change your sources.list and precise.list in /etc/apt to remove the failed repositories. Repeat until apt-get update is without errors. Then try starting RVM .

+66
May 14 '14 at 9:42
source share

I also had to delete the failed repositories, but it was difficult for me to identify them and delete them based on the instructions here. So I found a link that explains why this is happening and how to delete bad repositories:

In short, run the following command to find failed repositories:

 sudo apt-get update | grep "Failed" 

An example output might be:

 :~# apt-get update | grep "Failed" W: Failed to fetch http://ppa.launchpad.net/upubuntu-com/web/ubuntu/dists/trusty/main/binary-amd64/Packages 404 Not Found W: Failed to fetch http://ppa.launchpad.net/upubuntu-com/web/ubuntu/dists/trusty/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead. 

And finally, use this command to delete failed repo (s):

 sudo add-apt-repository --remove ppa:{failing ppa} 

for example, here it will look like this:

 sudo add-apt-repository --remove ppa:upubuntu-com/web 
+31
Dec 15 '14 at 14:20
source share

Alternatively, you can also cut shit in rvm. I edited requirements_debian_update_system () in the file / usr / share / rvm / scripts / functions / requirements / ubuntu as follows:

  requirements_debian_update_system() { echo "*fake* apt-get update" # __rvm_try_sudo apt-get --quiet --yes update || # { # typeset __ret=$? # case ${__ret} in # (100) # rvm_error "There has been error while updating 'apt-get', please give it some time and try again later. #404 errors should be fixed for rvm to proceed. Check your sources configured in: # /etc/apt/sources.list # /etc/apt/sources.list.d/*.list #" # ;; # esac # return ${__ret} # } } 
+8
Dec 16 '14 at 10:10
source share

You can try to skip the rvm update system so that apt-get will not be called.

 # Disable RVM from trying to install necessary software via apt-get rvm autolibs disable # Then try installing Ruby: rvm install 2.4.0 

See https://stackoverflow.com>

+6
Feb 16 '17 at 23:02 on
source share

You do not need apt-get to install rvm and use it!

Just twist (apt-get install curl)

Running \curl -sSL https://get.rvm.io | bash -s stable --ruby \curl -sSL https://get.rvm.io | bash -s stable --ruby

and rvm install 2.1.1 or another ruby ​​version, and it works;)

Gem update etc.

RVM is not dependent on apt-get, so you will no longer release it.

For more information: https://rvm.io/rvm/install

+2
Jul 12 '14 at 18:13
source share

I had the same problem. If none of the other answers work, try this. I ran the following command to fix this:

sudo apt-get -f install

Then I remembered that that day I could not install the package. What this team did was resolve the dependencies of this package and let the RVM do its job.

+2
Jul 30 '15 at 0:32
source share

This happened to me when I tried to install the Ruby version as a non-sudoer user. However, when I logged in as admin (with sudo privileges) and ran sudo apt-get update | grep "Failed" sudo apt-get update | grep "Failed" , I would not get any errors, and nevertheless rvm install xxx will still lead to a password request (when I ran rvm install -sudoer.)

I banged my head about this for a while because I did not want my rvm (regular user) user to have sudo privileges. Then, after several attempts to search on Google, I realized that I can log in as a user of my administrator.

Complete the RVM installation steps for this user (according to their documentation ):

$ gpg --keyserver hkp: //keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3

$ \ curl -sSL https://get.rvm.io | bash -s stable

$ source ~ / .rvm / scripts / rvm

Then (as the admin user) immediately insert the necessary RVM packages:

$ rvm requirements

at this moment, it asks for my sudo password and installs the necessary apt packages for the entire system after entering the password.

Then I log out of the server as an administrator and log in as the rvm user (without sudo privileges) and try to install the Ruby version.

$ rvm install xxx

and now it works.

+2
Sep 12 '16 at 23:05
source share

I just tried

sudo apt-get update and found that some of them do not work; eg.

Err http://extras.ubuntu.com raring / main Sources 404 Not found

I went ahead and removed these items from the list here.

sudo gedit / etc / apt / sources.list

It worked!

0
Jul 12 '14 at
source share

I got an error similar to this when running curl -sSL https://get.rvm.io | bash -s stable --ruby curl -sSL https://get.rvm.io | bash -s stable --ruby . It took some time, but I finally realized that my synaptic was open: the setup program could not work, because apt was blocked

0
Sep 08
source share

I also got this error when my working directory was inside the installed directory.

The fix was only:

cd ~

I realized this by seeing this at the bottom of the sudo apt-get update

E: Unable to change to /path/to/my/current/directory/ - chdir (13: Permission denied)

0
Sep 10 '15 at 3:44
source share

I have the same error. I tried most of the answers above, but no one works for me, so I just change the server

  • Go to etc / apt directory
  • click on Sources.list
  • Change the server to us or to another server
  • Reload (it will update your cache from this server)
  • Then run sudo apt-get update
0
Apr 7 '16 at 7:44
source share

this problem is caused in apt-get update , so you need to disable PPA:

System Preferences> Software and Updates> Other Software

then reinstall.

0
May 01 '17 at 5:22 a.m.
source share

In my case, rvm missed some linux packages that could not be installed without sudo. There were no apt-get installation errors.

When rvm install ruby ​​xxx was launched with sudo, rvm installed the packages needed to build ruby, and it worked.

0
Oct 08 '17 at 17:51 on
source share
 apt install libc6:amd64 libc6:amd64 libc6 libc6-dev:amd64 libc6-dev libc-dev-bin libc-bin man-db libc-dev-bin libc6-dev:amd64 

this works great for me ^^

-one
Feb 18 '17 at 16:34 on
source share



All Articles