gpt4 book ai didi

ruby-on-rails - 使用 native 扩展构建 gem (Gem::Installer::ExtensionBuildError)

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

我有以下配置:

  • uname -a : Linux 2.6.24.2 i686 GNU/Linux (Ubuntu)
  • ruby -v :ruby 1.9.0(2007-12-25 修订版 14709)[i486-linux]
  • rails -v : Rails 3.0.0.beta3
  • gem -v : 1.3.5
  • rake --version : rake,版本 0.8.7
  • ma​​ke -v : GNU Make 3.81
  • gem 环境:
    • RUBYGEMS 版本:1.3.5
    • RUBY 版本:1.9.0(2007-12-25 补丁级别 0)[i486-linux]
    • 安装目录:/usr/lib/ruby1.9/gems/1.9.0
    • RUBY 可执行文件:/usr/bin/ruby1.9
    • 可执行目录:/usr/bin
    • RUBYGEMS 平台:
    • ruby
    • x86-linux
    • 创业板路径:
      • /usr/lib/ruby1.9/gems/1.9.0
      • /root/.gem/ruby/1.9.0
    • gem 配置:
      • :update_sources => 真
      • :verbose => true
      • :benchmark => 假
      • :backtrace => 假
      • :bulk_threshold => 1000
    • 远程资源:

当我尝试这个简单的命令时:

gem install nokogiri

这是我得到的:

# gem install nokogiriBuilding native extensions.  This could take a while...ERROR:  Error installing nokogiri:        ERROR: Failed to build gem native extension./usr/bin/ruby1.9 extconf.rbchecking for iconv.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yeschecking for libxml/parser.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yeschecking for libxslt/xslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yeschecking for libexslt/exslt.h in /opt/local/include/,/opt/local/include/libxml2,/opt/local/include,/opt/local/include,/opt/local/include/libxml2,/usr/local/include,/usr/local/include/libxml2,/usr/include,/usr/include/libxml2,/usr/include,/usr/include/libxml2... yeschecking for xmlParseDoc() in -lxml2... yeschecking for xsltParseStylesheetDoc() in -lxslt... yeschecking for exsltFuncRegister() in -lexslt... yeschecking for xmlRelaxNGSetParserStructuredErrors()... yeschecking for xmlRelaxNGSetParserStructuredErrors()... yeschecking for xmlRelaxNGSetValidStructuredErrors()... yeschecking for xmlSchemaSetValidStructuredErrors()... yeschecking for xmlSchemaSetParserStructuredErrors()... yescreating Makefilemakecc -I. -I/usr/include/libxml2 -I/usr/include -I/usr/include/ruby-1.9.0/i486-linux -I/usr/include/ruby-1.9.0 -I. -DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -DHAVE_XMLRELAXNGSETPARSERSTRUCTUREDERRORS -DHAVE_XMLRELAXNGSETVALIDSTRUCTUREDERRORS -DHAVE_XMLSCHEMASETVALIDSTRUCTUREDERRORS -DHAVE_XMLSCHEMASETPARSERSTRUCTUREDERRORS -I/opt/local/include/ -I/opt/local/include/libxml2 -I/opt/local/include  -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-aliasing -g  -fPIC   -g -DXP_UNIX -O3 -Wall -Wcast-qual -Wwrite-strings -Wconversion -Wmissing-noreturn -Winline  -o xml_document_fragment.o -c xml_document_fragment.cIn the included file starting at ./nokogiri.h:75,          From ./xml_document_fragment.h:4,          From xml_document_fragment.c:1:./xml_document.h:5:16: error: st.h : No file or folder with this typemake: *** [xml_document_fragment.o] Error 1Gem files will remain installed in /usr/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.4.1 for inspection.Results logged to /usr/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.4.1/ext/nokogiri/gem_make.out

The "gem_make.out" file contains the exact same information as described above.

If I try with another gem:

gem install gherkin

这是我得到的:

u# gem install gherkinBuilding native extensions.  This could take a while...ERROR:  Error installing gherkin:        ERROR: Failed to build gem native extension./usr/bin/ruby1.9 extconf.rbchecking for main() in -lc... yescreating Makefilemakecc -I. -I/usr/include/ruby-1.9.0/i486-linux -I/usr/include/ruby-1.9.0 -I. -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-aliasing -g  -fPIC   -o gherkin_lexer_ar.o -c gherkin_lexer_ar.c/Users/aslakhellesoy/scm/gherkin/tasks/../ragel/i18n/ar.c.rl:11:16: erreur: re.h : Aucun fichier ou dossier de ce typemake: *** [gherkin_lexer_ar.o] Erreur 1Gem files will remain installed in /usr/lib/ruby1.9/gems/1.9.0/gems/gherkin-1.0.30 for inspection.Results logged to /usr/lib/ruby1.9/gems/1.9.0/gems/gherkin-1.0.30/ext/gherkin_lexer_ar/gem_make.out

事实上,每当我尝试安装带有 native 扩展的 gem 时,我都会遇到相同类型的错误。

这会给任何人敲响警钟吗?

最佳答案

似乎Issue #116 of Nokogiri说明一切:

Ruby 1.9.0 is not supported. You should upgrade to 1.9.1-p129 or even the 1.9.2. 1.9.0 is too broken to be supported. :-(

我现在可能想更新这个 ruby​​ 小东西......

关于ruby-on-rails - 使用 native 扩展构建 gem (Gem::Installer::ExtensionBuildError),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2873070/

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