无法在莫哈韦中使用rvm安装新版本的Ruby

oyt4ldly  于 2023-04-11  发布在  Ruby
关注(0)|答案(2)|浏览(135)

我尝试使用RVM安装新版本的ruby,rvm install 2.5.0,但在配置过程中安装失败

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版本:rvm 1.29.9

bq9c1y66

bq9c1y661#

我记得在过去的几周里我把mysql从5.6升级到了5.7,所以在bash文件中我有一些mysql5.6的配置阻止了ruby的安装。
打开bash文件

nano .bash_profile

删除
LDFLAGS="-L/usr/local/opt/mysql@5.6/lib”
重新加载bash或打开其他终端

source ~/.bash_profile
thigvfpy

thigvfpy2#

在尝试了所有的方法之后,这个答案是唯一对我有帮助的:

LIBRARY_PATH="" rvm install X.X.X

也支持rvm upgrade

相关问题