简体   繁体   中英

Can´t install a new version of ruby using rvm in Mojave

I tried to install a new version of ruby using RVM, rvm install 2.5.0 but during configure process the installation fails

Error running ‘./configure --prefix=/Users/evelinponce/.rvm/rubies/ruby-2.5.0 --with-openssl-dir=/usr/local/opt/openssl/bin/openssl --with-opt-dir=/usr/local/opt/libyaml:/usr/local/opt/libksba:/usr/local/opt/readline:/usr/local/opt/zlib:/usr/local/opt/openssl@1.1 --disable-install-doc --enable-shared’,
please read /Users/evelinponce/.rvm/log/1574200398_ruby-2.5.0/configure.log
There has been an error while running configure. Halting the installation.

configure.log

...
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS="-L/usr/local/opt/mysql@5.6/lib"

RVM version: rvm 1.29.9

I remembered that in the last weeks I upgraded mysql from 5.6 to 5.7 so in the bash file I had some mysql5.6 configurations blocking the ruby installation. Only what I need to do was delete from bash profile the lines related with mysql5.6

Open bash file

nano .bash_profile

Delete

LDFLAGS="-L/usr/local/opt/mysql@5.6/lib"

Reload bash or open other terminal

source ~/.bash_profile

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM