安装Nokogiri时出现GCC编译错误 [英] GCC compilation error when installing Nokogiri

查看:67
本文介绍了安装Nokogiri时出现GCC编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行 bundle install ,但是在尝试安装Nokogiri 1.10.3时出现错误消息

I'm trying to run bundle install but I'm getting the Error while trying to 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'

推荐答案

对于那些不阅读评论的人

For those who do not read comments

Debian 10用户(如果找到)

Debian 10 users, if you find

 gcc: error: unrecognized command line option '-Wduplicated-cond'

在mkmf.log

brew unlink gcc

是您要寻找的.我花了一个小时寻找答案,是的,我曾经在这里错过了答案,但幸运的是我已经回来并发现了它.

is what you are looking for. I spend an hour looking for an answer and yes, i once missed the answer here, but luckily i have returned and spotted it.

这篇关于安装Nokogiri时出现GCC编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆