How to install RVM system requirements without giving sudo access for RVM user
Solution 1:
This is indeed a new feature of RVM called autolibs
, which automatically installs dependencies.
If you have already installed RVM, and it is asking you for your sudo
password, you can disable autolibs:
$ rvm autolibs disable
$ rvm requirements # manually install these
$ rvm install ruby
Otherwise, you can install RVM without autolibs with this command:
$ \curl -L https://get.rvm.io | bash -s -- --autolibs=read-fail
I understand the motivation, but find it rather annoying. I do not want to put my sudo password into RVM, nor for that matter Bundle! Please community, stop doing this.
Solution 2:
I prefer this
$ rvm autolibs fail
$ rvm install ruby
Searching for binary rubies, this might take some time.
Found remote file https://rubies.travis-ci.org/ubuntu/12.04/x86_64/ruby-2.1.1.tar.bz2
Checking requirements for ubuntu.
Missing required packages: gawk g++ gcc make libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev
RVM autolibs is now configured with mode '2' => 'check and stop if missing',
please run `rvm autolibs enable` to let RVM do its job or run and read `rvm autolibs [help]`
or visit https://rvm.io/rvm/autolibs for more information.
Requirements installation failed with status: 1.
then I can relogin with root and run
# apt-get install gawk g++ gcc make libreadline6-dev zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 autoconf libgdbm-dev libncurses5-dev automake libtool bison pkg-config libffi-dev