Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/redis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby nokogumbo在Gentoo上的安装因捆绑和gems而失败_Ruby_Rubygems_Bundler_Gumbo - Fatal编程技术网

Ruby nokogumbo在Gentoo上的安装因捆绑和gems而失败

Ruby nokogumbo在Gentoo上的安装因捆绑和gems而失败,ruby,rubygems,bundler,gumbo,Ruby,Rubygems,Bundler,Gumbo,ruby版本:ruby 2.4.4p296(2018-03-28修订版63013)[x86\u 64-linux] 我可以用portage安装nokogumbo,但不能用gem或bundle安装它。 我尝试将文件读取到配置包,但不知道如何配置 我还尝试添加——使用ldflags=-Wl,--no未定义的,它也会失败 $ gem install nokogumbo Building native extensions. This could take a while... ERROR: Erro

ruby版本:
ruby 2.4.4p296(2018-03-28修订版63013)[x86\u 64-linux]

我可以用portage安装nokogumbo,但不能用gem或bundle安装它。

我尝试将文件读取到配置包,但不知道如何配置

我还尝试添加
——使用ldflags=-Wl,--no未定义的
,它也会失败

$ gem install nokogumbo
Building native extensions. This could take a while...
ERROR:  Error installing nokogumbo:
        ERROR: Failed to build gem native extension.

    current directory: /home/git/.gem/ruby/2.4.0/gems/nokogumbo-1.5.0/ext/nokogumboc
/usr/bin/ruby24 -r ./siteconf20180628-12916-1nvqzxo.rb extconf.rb
checking for xmlNewDoc() in -lxml2... yes
checking for nokogiri.h in /usr/lib64/ruby/gems/2.4.0/gems/nokogiri-1.8.1/ext/nokogiri... yes
checking for nokogiri.h in /usr/lib64/ruby/gems/2.4.0/gems/nokogiri-1.8.1/ext/nokogiri... yes
checking for gumbo_parse() in -lgumbo... yes
checking for GumboErrorType with error.h... not found
checking for GumboInsertionMode with insertion_mode.h... not found
checking for GumboParser with parser.h... not found
checking for GumboStringBuffer with string_buffer.h... not found
checking for GumboTokenType with token_type.h... not found
creating Makefile

current directory: /home/git/.gem/ruby/2.4.0/gems/nokogumbo-1.5.0/ext/nokogumboc
make "DESTDIR=" clean

current directory: /home/git/.gem/ruby/2.4.0/gems/nokogumbo-1.5.0/ext/nokogumboc
make "DESTDIR="
compiling nokogumbo.c
nokogumbo.c:24:10: fatal error: parser.h: No such file or directory
 #include "parser.h"
          ^~~~~~~~~~
compilation terminated.
make: *** [Makefile:242: nokogumbo.o] Error 1

make failed, exit code 2

Gem files will remain installed in /home/git/.gem/ruby/2.4.0/gems/nokogumbo-1.5.0 for inspection.
Results logged to /home/git/.gem/ruby/2.4.0/extensions/x86_64-linux/2.4.0/nokogumbo-1.5.0/gem_make.out

我尝试运行
gem install nokogumbo--ldflags='-L-Wl,-O1-Wl,--as-needed-fstack protector-rdynamic-Wl,-export dynamic'
,它引用了ebuild文件,然后成功了!
现在,我将其用于bundle。

谷歌的第一个结果:
sudo apt get install libxml2 dev libxml2 doc
。“你试过了吗?”汤姆洛德:当然,我找到了。但我用的是gentoo,不是ubuntu。我的系统上安装了libxml2。