【发布时间】:2020-12-01 04:17:47
【问题描述】:
我正在尝试将 Jekyll 安装到服务器上。我在 2.7.0 上安装了 Ruby,并且还安装了 Bundler,我正在使用 RVM,并且在安装过程中一切顺利,但是当我运行 gem install jekyll 或 sudo gem install jekyll 时,我似乎无法安装 jekyll一个 Cent OS 服务器,我得到的错误附加为:
Building native extensions. This could take a while...
ERROR: Error installing jekyll:
ERROR: Failed to build gem native extension.
current directory: /usr/local/rvm/gems/ruby-2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
/usr/local/rvm/rubies/ruby-2.7.0/bin/ruby -I /usr/local/rvm/rubies/ruby-2.7.0/lib/ruby/2.7.0 -r ./siteconf20200811-15255-1rx4cpi.rb extconf.rb
creating Makefile
current directory: /usr/local/rvm/gems/ruby-2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR=" clean
current directory: /usr/local/rvm/gems/ruby-2.7.0/gems/http_parser.rb-0.6.0/ext/ruby_http_parser
make "DESTDIR="
compiling ruby_http_parser.c
compiling ryah_http_parser.c
linking shared-object ruby_http_parser.so
/usr/bin/ld: unrecognized option '--compress-debug-sections=zlib'
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make: *** [ruby_http_parser.so] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/rvm/gems/ruby-2.7.0/gems/http_parser.rb-0.6.0 for inspection.
Results logged to /usr/local/rvm/gems/ruby-2.7.0/extensions/x86_64-linux/2.7.0/http_parser.rb-0.6.0/gem_make.out
不知道为什么会失败?
【问题讨论】:
-
@shingo.nakanishi 不,完整的日志在我的原始帖子上面列出,没有提到
http_parser作为文件夹,所以我不这么认为。 -
你能 grep 你的
env和compress-debug-sections的磁盘吗?某些东西将其添加到您的链接器标志中,而您的链接器不理解此标志。