首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >nokogumbo通过包和gems在Gentoo上安装失败

nokogumbo通过包和gems在Gentoo上安装失败
EN

Stack Overflow用户
提问于 2018-06-28 10:49:27
回答 1查看 429关注 0票数 1

ruby版本:ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-linux]

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

我尝试读取ebuild文件来配置包,但是我不知道如何配置。

我还尝试添加--with-ldflags=-Wl,--no-undefined,它也失败了。

代码语言:javascript
复制
$ 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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-29 03:50:48

我尝试运行来自ebuild文件的gem install nokogumbo -- --with-ldflags='-L. -Wl,-O1 -Wl,--as-needed -fstack-protector -rdynamic -Wl,-export-dynamic',然后成功!现在,我用它来打包。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/51080998

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档