我正在尝试运行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'发布于 2020-05-22 18:59:47
对于那些不阅读评论的人
Debian 10个用户,如果您找到
gcc: error: unrecognized command line option '-Wduplicated-cond'在mkmf.log中
brew unlink gcc就是你要找的东西。我花了一个小时寻找答案,是的,我曾经错过了这里的答案,但幸运的是我回来了并发现了它。
发布于 2020-09-03 21:45:10
我也遇到过类似的问题。我的默认编译器不能识别某些命令行选项,就像你面对的那样。
我的gcc版本是10,我可以通过添加一个较老的gcc版本(5.5)来解决这个问题,并将其设置为gem安装的默认版本。我按照这个thread中给出的步骤来做。
https://stackoverflow.com/questions/56567095
复制相似问题