install ruby 1.9.3 using rvm on ubuntu [duplicate]

点点圈 提交于 2019-11-29 23:10:11

I tried to do rvm pkg readline, install ubuntu pkgs etc without any success. What worked for me:

gem install rb-readline

And add the following line to your Gemfile:

gem 'rb-readline'

What I ended up doing is remove all the libreadline from rvm usr/lib/ path.

Installed libreadline5-dev package (.deb in this case) downloaded manually, because the new ubuntu distro has only libreadline6-dev as candidate.

went to rvm ruby 1.9.3 src and:

ruby extconf.rb --with-editline-dir=/usr/ --with-readline-dir=/usr/
make
sudo make install

Now works like a charm.

Very painful stuff :)

edit:

also keep in mind that readline uses also libeditline-dev now, you can disable manually when configure ruby readline , passing: --disable-libedit

 ruby extconf --disable-libedit

I've always found getting RVM to play nicely with packages to be a bit of voodoo. A lot of times, it's about catching a dependency - I put together a script that I've had luck with in past, try this:

sudo apt-get install zlib1g-dev libssl-dev libsqlite3-dev libmysqlclient-dev imagemagick librmagick-ruby libxml2-dev libxslt1-dev build-essential openssl libreadline6 libreadline6-dev zlib1g libyaml-dev libsqlite3-0 sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison libpq-dev libpq5 libmysql-ruby libmysqlclient-dev

rvm pkg install autoconf
rvm pkg install zlib
rvm pkg install readline
rvm pkg install openssl
rvm pkg install iconv
rvm install 1.9.3
rvm use 1.9.3 --default
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!