Readline not working in rvm - Ubuntu 11.10

后端 未结 6 1805
终归单人心
终归单人心 2021-01-04 09:43

I am using rvm on my ubyntu 11.10. My readline is not working, I tried ruby extconf.rb but it is not passed. Output is bellow:

$ ruby extconf.rb         


        
相关标签:
6条回答
  • 2021-01-04 10:10

    I've googled for a couple days, but no answers helps me, so my solution was:

    Fully remove rvm How to remove rvm

    Remove all ruby packages. First, find out which packages do you have:

    dpkg -l | grep ruby
    

    then make

    sudo apt-get purge {PACKAGE}

    where {PACKAGE} is package you want to remove ( for me there were ruby ruby1.8 ruby1.9.1 )

    Then I made fresh installation of RVM Install RVM and installed ruby 1.9.2 with

    rvm install 1.9.2
    

    Now it should work!

    0 讨论(0)
  • 2021-01-04 10:15

    For some reason I can't comment on @zzeroo's answer, but I want to draw attention to the fact that he's using

     --with-readline-dir=/usr/include/readline
    

    instead of

    --with-readline-dir=$rvm_path/usr
    

    I was banging my head against the wall for a long time and changing this fixed it for me.

    0 讨论(0)
  • 2021-01-04 10:26

    I got the solution:

    Run the command

    rvm requirements
    

    It shows the requirements and dependencies. Install those and reinstall the ruby on rvm

    rvm remove 1.9.2
    rvm install 1.9.2
    

    It works!

    0 讨论(0)
  • 2021-01-04 10:27

    I tried everything, but it didn't work. I had to do rvm implode (after having all the requirements installed) and then rvm install 1.8.7; rvm install 1.9.3 and it wor

    0 讨论(0)
  • 2021-01-04 10:28

    Same issue as here Readline errors prevent me running rails console

    Under ubuntu you can use the system readline installation.

    rvm uninstall ${YOURUBYVERSION}
    sudo apt-get install libreadline-dev
    rvm install ${YOURUBYVERSION} --with-readline-dir=/usr/include/readline
    

    Substitute ${YOURUBYVERSION} with your desired ruby version.

    0 讨论(0)
  • 2021-01-04 10:29

    Have you tried:

    rvm pkg install readline
    

    Then install ruby through RVM --with-readline-dir=$rvm_path/usr?

    http://beginrescueend.com/packages/readline/

    FWIW, I'd suggest giving rbenv + ruby-build a go, if you've never considered it. A lot less headaches than with RVM.

    0 讨论(0)
提交回复
热议问题