我认识到这是一个重复的问题,但是我发现的与此问题相关的所有其他答案似乎都没有帮助我......
我正在安装GitLab
并运行 gem 依赖项,当它达到NokoGiri
gem 要求并失败并显示以下信息时:
ERROR: Error installing nokogiri:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
extconf.rb:10:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:10:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
extconf.rb:11:in `<main>': Use RbConfig instead of obsolete and deprecated Config.
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... yes
checking for libexslt/exslt.h... yes
checking for iconv_open() in iconv.h... yes
checking for xmlParseDoc()... -lxml2
checking for xsltParseStylesheetDoc()... -lxslt
-----
libxslt is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.
-----
因此,此错误导致我尝试libxslt
使用以下命令进行安装:
$ sudo apt-get install libxslt-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libxslt1-dev' instead of 'libxslt-dev'
libxslt1-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 146 not upgraded.
那么给了什么?NokoGiri 需要这个包,但是这个包已经安装了!!我似乎无法解决这个问题,有什么帮助吗?