简体   繁体   English

无法在 Mojave 中使用 rvm 安装新版本的 ruby

[英]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我尝试使用 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 version: rvm 1.29.9 RVM 版本: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.我记得在过去的几周里,我将 mysql 从 5.6 升级到了 5.7,所以在 bash 文件中,我安装了一些 mysql5.6 配置阻止了 ruby。 Only what I need to do was delete from bash profile the lines related with mysql5.6只有我需要做的是从 bash 配置文件中删除与 mysql5.6 相关的行

Open bash file打开 bash 文件

nano .bash_profile

Delete删除

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

Reload bash or open other terminal重新加载bash或打开其他终端

source ~/.bash_profile

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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