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

前端 未结 4 694
北海茫月
北海茫月 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

    0 讨论(0)
  • 2020-12-10 05:09

    I had the same problem and the answer in the post Getting error for libxml2.2.dylib "file is not of required architecture") finally helped me resolve it.

    0 讨论(0)
  • 2020-12-10 05:12

    You have to install developer tools. You can download Xcode (the developer tools comes with it) for 5 dollars at the mac app store.

    0 讨论(0)
  • 2020-12-10 05:22

    I'm pasting the output of 'rvm notes' here as this matters directly. You need at least Xcode 3.2.1 (1613). Please note that Snow Leopard was the firs to have this revision so you'll need to grab the updated Xcode.

    ∴ rvm notes

    Notes for Darwin ( Mac OS X )
    For Snow Leopard be sure to have Xcode Tools Version 3.2.1 (1613) or later You should download the latest Xcode tools from developer.apple.com. (This is since the dvd install for Snow Leopard contained bugs).

    If you intend on installing MacRuby you must install LLVM first. If you intend on installing JRuby you must install the JDK. If you intend on installing IronRuby you must install Mono (version 2.6 or greater is recommended).

    To use an RVM installed Ruby as default instead of the system ruby: rvm install 1.8.7 # installs patch 352: closest supported version rvm system ; rvm gemset export system.gems ; rvm 1.8.7 ; rvm gemset import system migrate your gems rvm --default 1.8.7

    NOTE:
    As of 1.8.0 RVM once again loads .rvmrc files, by default, after asking your permission to trust it of course. If you do not wish to be enabled, simply set: export rvm_project_rvmrc=0 Within either your /etc/rvmrc or $HOME/.rvmrc file. This will turn off the cd/pushd hooks when sourcing the rvm() function into your shell.

    Example: echo 'export rvm_project_rvmrc=0' >> $HOME/.rvmrc; (Then close the current shell and open a new one.)

    As of this writing the current RVM is 1.8.3, the required Xcode is minimally 3.2.1, and you can use either the readline in Homebrew, RVM's 'rvm pkg install readline' or Lion's built-in readline (though there have been significant reports of that failing).

    You would pass that info in as shown on the site.

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