gpt4 book ai didi

ruby-on-rails - 亚马逊 Ami - 错误 "instaling nokogiri using bundle"

转载 作者:太空宇宙 更新时间:2023-11-03 16:02:43 28 4
gpt4 key购买 nike

如果我执行:

gem install nokogiri -v '1.6.1'

安装成功。

当我执行时:

 bundle install --deployment

我得到:

Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native
extension.

/home/ec2-user/.rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb Extracting libxml2-2.8.0.tar.gz into
tmp/x86_64-amazon-linux/ports/libxml2/2.8.0... OK Running 'configure'
for libxml2 2.8.0... ERROR, review
'tmp/x86_64-amazon-linux/ports/libxml2/2.8.0/configure.log' to see
what happened.
*** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check
the mkmf.log file for more details. You may need configuration
options.

Provided configuration options: --with-opt-dir --without-opt-dir
--with-opt-include --without-opt-include=${opt-dir}/include
--with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog
--without-make-prog --srcdir=. --curdir
--ruby=/home/ec2-user/.rvm/rubies/ruby-1.9.3-p484/bin/ruby
/mnt/sdh/beta/shared/bundle/ruby/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:265:in
`block in execute': Failed to complete configure task (RuntimeError)
from /mnt/sdh/beta/shared/bundle/ruby/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `chdir'
from /mnt/sdh/beta/shared/bundle/ruby/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:257:in `execute'
from /mnt/sdh/beta/shared/bundle/ruby/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:65:in `configure'
from /mnt/sdh/beta/shared/bundle/ruby/1.9.1/gems/mini_portile-0.5.2/lib/mini_portile.rb:108:in `cook'
from extconf.rb:101:in `block in <main>'
from extconf.rb:119:in `call'
from extconf.rb:119:in `block in <main>'
from extconf.rb:109:in `tap'
from extconf.rb:109:in `<main>'


Gem files will remain installed in /mnt/sdh/beta/shared/bundle/ruby/1.9.1/gems/nokogiri-1.6.1 for
inspection. Results logged to /mnt/sdh/beta/shared/bundle/ruby/1.9.1/gems/nokogiri-1.6.1/ext/nokogiri/gem_make.out
An error occurred while installing nokogiri (1.6.1), and Bundler
cannot continue. Make sure that `gem install nokogiri -v '1.6.1'`
succeeds before bundling.

最佳答案

我在使用 libxml2 for libxml2 2.8.0

时遇到了类似的问题

尝试安装补丁,以便 nokogiri 可以使用:

sudo yum install -y patch

然后,安装 nokogiri:

sudo gem install nokogiri

我在 AWS Developer Forum 上找到了这个答案它对我有用。

关于ruby-on-rails - 亚马逊 Ami - 错误 "instaling nokogiri using bundle",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21211646/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com