我正在尝试运行 bundle install
但我在尝试安装 Nokogiri 1.10.3 时遇到错误
这是来自 mkmf.log
的错误信息.
gcc -o conftest -I/home/chille/.rvm/rubies/ruby-2.5.1/include/ruby-2.5.0/x86_64-linux -I/home/chille/.rvm/rubies/ruby-2.5.1/include/ruby-2$
gcc: error: unrecognized command line option '-Wmisleading-indentation'
gcc: error: unrecognized command line option '-Wimplicit-fallthrough=0'
gcc: error: unrecognized command line option '-Wduplicated-cond'
gcc: error: unrecognized command line option '-Wrestrict'
最佳答案
对于那些不看评论的人
Debian 10 用户,如果您发现
gcc: error: unrecognized command line option '-Wduplicated-cond'
在 mkmf.log 中
brew unlink gcc
就是你要找的。我花了一个小时寻找答案,是的,我曾经在这里错过了答案,但幸运的是我已经回来并发现了它。
关于ruby - 安装 Nokogiri 时 GCC 编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56567095/