OpenSSL error installing ruby 2.0.0-p195 on Mac with rbenv

后端 未结 7 1264
别那么骄傲
别那么骄傲 2021-02-04 06:05

I\'m trying to install Ruby 2.0.0-p195 using rbenv on a Mac (Mountain Lion) and got this error.

BUILD FAILED

Inspect or clean up the working tree at /var/folde         


        
7条回答
  •  北恋
    北恋 (楼主)
    2021-02-04 06:48

    Try adding OpenSSL to the config options using the --with-openssl-dir option:

    $ CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install 2.0.0-p195
    

    If you're using Homebrew, you'll need to install OpenSSL before running the above by running:

    $ brew install openssl
    

    UPDATE (see @JarkkoLaine 's comment below):

    Just for the record, you should not need to use the config opts anymore with ruby-build and homebrew. However, I had to reinstall openssl with homebrew to make it work: brew uninstall openssl; brew upgrade; brew install openssl; rbenv install 2.0.0-p247. See this for more info.

提交回复
热议问题