RVM Does Not Install Ruby 1.9.2 on Snow Leopard: 'Error running 'make '

前端 未结 4 718
北海茫月
北海茫月 2020-12-10 04:35

When I try to install Ruby 1.9.2 on Snow Leopard using:

rvm install 1.9.2

I get the following:

ERROR: Error running \'make          


        
4条回答
  •  北荒
    北荒 (楼主)
    2020-12-10 05:00

    Compile and install your own readline:

    curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz
    tar xzvf readline-6.1.tar.gz
    cd readline-6.1
    ./configure --prefix=/usr/local
    make
    sudo make install
    cd ..
    

    Remove the ruby: rvm remove 1.9.2

    Install it again: rvm install 1.9.2

    (You might need to add source it if local path is not in your directory: rvm install 1.9.1 -C --with-readline-dir=/usr/local/

    That should do it.

    ------------- EDIT --------------

    As noted in the comment below, if you use homebrew, then you should brew install readline. And if you're using a Mac, you should be using homebrew.

    ------------ HOW TO COMPILE READLINE ON 10.7 ---------

    "readline-6.2 has not been updated for Mac OS X 10.7 (darwin11), so open the support/shobj-conf and change darwin10 to darwin11 in the two places where it appears."

    Source: lamboy

提交回复
热议问题