I use RVM to install ruby 2.2.0,rvm install 2.2.0 --disable-binary
but I get the error:
Error running 'requirements_debian_update_system ruby-2.2.0',
showing last 15 lines of /home/gaoyikang/.rvm/log/1471531667_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.
404 errors should be fixed for rvm to proceed. 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.
404 errors should be fixed for rvm to proceed. Check your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
++ return 100
Requirements installation failed with status: 100.
I don't know how to fix it? Anyone hava faced the problem???
Try this:
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties libffi-dev
Then install latest version or required version of Ruby.
I get following error when trying to install anything with RVM:
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?
RVM doesn't behave well if apt-get update has errors. If your apt sources have an invalid repository that gives 404 or GPG error, RVM will refuse to work. This can be confusing because it happens even if the faulty 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. Edit your sources.list and precise.list in /etc/apt to remove the faulty repositories. Repeat until apt-get update succeeds without any errors. Then try running RVM.
You can try to skip the rvm updating system so apt-get won't 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/a/16759839/1212791
I also had to remove failing repositories but I had hard time spotting them and removing them based on instructions here. So I found this link which explains exactly why this happens and how to remove failing repositories:
In short, run following to find failing repositories:
sudo apt-get update | grep "Failed"
An example output can be like this:
:~# 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 remove the failing repo(s):
sudo add-apt-repository --remove ppa:{failing ppa}
for the example here it will look like this:
sudo add-apt-repository --remove ppa:upubuntu-com/web
Alternative, it is also possible to cut the crap in rvm. I edited requirements_debian_update_system() in file /usr/share/rvm/scripts/functions/requirements/ubuntu like this:
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}
# }
}
This happened to me as well when I was trying to install a version of Ruby as a non-sudoer user. However, when I logged in as my admin user (with sudo privileges) and ran sudo apt-get update | grep "Failed" I would get no errors and, yet, rvm install x.x.x would still result in asking for a password (when I ran rvm install as the non-sudoer user.)
I was banging my head with this for a while because I didn't want my rvm (regular user) user to have sudo privileges. Then after some putzing around on Google I figured out that I could log in as my admin user.
Go through the steps of installing RVM for that user (as per 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) jump straight into installing the RVM required packages:
$ rvm requirements
at which point it asks for my sudo password and installs the required apt packages for the entire system after I enter my password.
Then I log off from server as admin user and log back in as rvm user (with no sudo privileges) and try to install a version of Ruby.
$ rvm install x.x.x
and now it works.
You don't need of apt-get to install rvm and to use it !
Just curl (apt-get install curl)
Launch \curl -sSL https://get.rvm.io | bash -s stable --ruby
and rvm install 2.1.1 or another ruby's version and it works ;)
gem update etc...
RVM will be independent of apt-get so you'll have no longer issu.
For more informations : https://rvm.io/rvm/install
I had the same issue. If none of the other answers work try this. I ran the following command to fix it:
sudo apt-get -f install
Then I remembered that I failed installing a package earlier that day. What this command did was resolve the dependencies on that package and allowed RVM to do its thing.
I just tried
sudo apt-get update and found some of them are failing; for example..
Err http://extras.ubuntu.com raring/main Sources
404 Not Found
I went ahead and deleted those items from the list here..
sudo gedit /etc/apt/sources.list
It worked!
I was getting an error similar to this while running curl -sSL https://get.rvm.io | bash -s stable --ruby. It took a while but I finally realised that I had synaptic open: the installer couldn't run because apt was locked
I was also getting this error when my working directory was inside a mounted dir.
The fix was just to:
cd ~
I figured this out by seeing this at the bottom of a sudo apt-get update
E: Unable to change to /path/to/my/current/directory/ - chdir (13: Permission denied)
I got the same error.I tried most of above answers but none works for me, so i just change server
Goto directory etc/apt
click on Sources.list
Change the server to us or some else server
Reload (it will update your cache from that server)
Then run sudo apt-get update
this problem caused in apt-get update so you have to disable the PPA :
System Settings>Software & Updates>Other Software
then reinstall.
In my case rvm missed some linux packages, which couldnt be installed without sudo. There were no apt-get install errors at all.
When running rvm install ruby x.x.x with sudo, rvm installed packages required to build ruby and it worked.
Issue - requirements_debian_update_system ruby-2.2.2 error
I also had the same issue. I found info on this link
Click Here
I followed this and resolved my issue. Was able to install ruby as
rvm install 2.2
1) Before installing ruby must be done update:
apt is preferred over apt-get for interactive use in recent Ubuntu versions and apt should fix by:
sudo apt update
sudo apt upgrade
Or with apt-get may be used --allow-releaseinfo-change
sudo apt-get --allow-releaseinfo-change update
2) After successfully installation, for example ruby-2.3.1:
rvm install 2.3.1
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
thats work fine for me ^^
The problem is with your sources configured in:
/etc/apt/sources.list
/etc/apt/sources.list.d/*.list
So to check the errors you have to run this command and need to find that which PPA is firing errors:
sudo apt-get update | grep "Failed"
Then to resolve this error you have to press the Windows key and need to search "Software & Updates".
Then open it and go into Other Software there you can see some URLs which is failed while update.
Then uncheck those URLs from this and close this window and then do
sudo apt-get update
Finally, you can install ruby with
rvm install 2.4
PS: You can change the version you want to install ruby.
I installed RVM on my Fedora 19 system a few months ago, and it was working fine. Then I had some other work and when I opened the machine again, it said:
# rvm
bash: rvm: command not found...
I tried to reinstall RVM, and this is what I get:
# rpm -i rvm-devel-1.17-8.fc19.x86_64.rpm
package rvm-devel-1.17-8.fc19.x86_64 is already installed
But I can't find it.
# ps ax | grep rvm
14363 pts/0 S+ 0:00 grep --color=auto rvm
Can anyone help me? What exactly is the problem?
P.S: The package rvm is there on the system.
# rpm -q rvm
rvm-1.17-8.fc19.x86_64
I recommend you to reinstall RVM, maybe it's crashed due to some event.
Use this command to implode it:
rvm implode
Or:
rm -rf ~/.rvm
Then install it by running:
sudo apt-get install curl
curl -L get.rvm.io | bash -s stable --auto
Then you'll need to reload the ~/.bash_profile file which you can do with this small command:
. ~/.bash_profile
Make sure to install other packages needed for Ruby to work:
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 pkg-config
sudo apt-get install pkgconfig
Now install the latest Ruby:
rvm install 2.0.0
rvm use 2.0.0
ruby -v
Now you can install Rails:
gem install rails -v 4.0.0
the package rvm-devel-1.17-8.fc19.x86_64 is not rvm as per http://rpm.pbone.net/index.php3/stat/4/idpl/20537074/dir/fedora_19/com/rvm-devel-1.17-8.fc19.x86_64.rpm.html it is:
The rvm-devel package contains libraries and header files for
developing applications that use rvm.
Follow installation instructions http://rvm.io/rvm/install to get RVM installed, make sure to read the outputs as important hints might be printed for you.
to uninstall rvm use anyone of the following:
rvm implode
or
rm -rf ~/.rvm
Just to be sure restart the terminal before you try installing rvm again
I use Puppet to install Ruby via RVM and was working fine until very recently (last few days or so).
I think its due to rvm wanting me to "press any key to continue". Is there anyway to force "yes" this, I've tried --force but no luck. Thanks
[root#local ~]# rvm install --binary --verify-downloads 1 ruby-1.9.3-p362
Searching for binary rubies, this might take some time.
Installing requirements for unknown, might require sudo password.
Always update your system first!
/bin/bash
/usr/bin/curl
which: no git in (/usr/local/rvm/gems/ruby-1.9.3-p362/bin:/usr/local/rvm/gems/ruby-1.9.3-p362#global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p362/bin:/usr/local/rvm/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin)
/usr/bin/patch
Install: git
Install: build-essential openssl libreadline zlib1g libyaml libsqlite3 sqlite3 libxml2 libxslt autoconf libc6 libgdbm ncurses automake libtool bison pkg-config
press any key to continue
Try:
$ yes | rvm install --binary --verify-downloads 1 ruby-1.9.3-p362
From yes's man page:
Repeatedly output a line with all specified STRING(s), or ‘y’.
this message is from the new autolibs feature of RVM, you can find docs of it here: https://rvm.io/rvm/autolibs
You can disable autolibs using:
rvm autolibs disable
and make sure to report back to RVM it did not recognize your system => https://github.com/wayneeseguin/rvm/issues ... make sure to include head -n 100 /etc/*release (run as user not root)
When I try to install rails in Ubuntu 12.10 I get this error:
$ gem install rails
ERROR: Loading command: install (LoadError)
cannot load such file -- zlib
ERROR: While executing gem ... (NameError)
uninitialized constant Gem::Commands::InstallCommand
So I completely removed rvm:
rvm implode
sudo rm -rf ~/.rvm
removed the script calls in my .bashrc and .bash_profile
and checked if they're really removed:
env | grep rvm #no output, so rvm is removed
ruby -v #The program 'ruby' can be found in the following packages: blabla
I already have these via sudo apt-get install:
curl zlib1g-dev zlib1g libssl-dev build-essential openssl libreadline6 libreadline6-dev curl git-core libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config
Then proceed to install from scratch
curl -L https://get.rvm.io | bash -s stable --ruby --auto-dotfiles
then run that line and restarted terminal regard to this message:
* To start using RVM you need to run `source /home/adige/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
Then rvm pkg install readline but completed with error:
...
Error running 'autoreconf -is --force', please read /home/adige/.rvm/log/readline/autoreconf.log
...
Please note that it's required to reinstall all rubies:
rvm reinstall all --force
I think it's installed anyway, right? Before reinstall all rubies, I installed zlib of course:
# w/out verify, it gives checksum error
rvm pkg install zlib --verify-downloads 1
Then run rvm reinstall all --force and completed with error again:
...
Install of ruby-1.9.3-p374 - #complete
Making gemset ruby-1.9.3-p374 pristine.
Error running '' under ,
please read /home/adige/.rvm/log/ruby-1.9.3-p374/gemset.pristine.log
Making gemset ruby-1.9.3-p374#global pristine.
gemset.pristine.log
Then reinstall ruby with zlib support:
rvm reinstall 1.9.3-p374 --with-zlib-dir=$rvm_path/usr
which returned same error and same log but completed anyway.
Finally I tried to install rails gem again but cannot load such file -- zlib !
Here is the rvm info
What am I doing wrong?
You should not install readline / zlib on ubuntu, follow this steps:
rvm get head
rvm pkg remove
rvm requirements run force
rvm reinstall 1.9.3-p374
make sure to include output of the installation process if this fails, also include all mentioned log files