我有以下配置:
/usr/bin/ruby1.9 extconf.rb 在 /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 中查找iconv.h... 找到了 在 /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 中查找libxml/parser.h... 找到了 在 /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 中查找libxslt/xslt.h... 找到了 在 /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 中查找libexslt/exslt.h... 找到了 在 -lxml2 中查找xmlParseDoc()... 找到了 在 -lxslt 中查找xsltParseStylesheetDoc()... 找到了 在 -lexslt 中查找exsltFuncRegister()... 找到了 检查xmlRelaxNGSetParserStructuredErrors()... 找到了 检查xmlRelaxNGSetParserStructuredErrors()... 找到了 检查xmlRelaxNGSetValidStructuredErrors()... 找到了 检查xmlSchemaSetValidStructuredErrors()... 找到了 检查xmlSchemaSetParserStructuredErrors()... 找到了 正在创建Makefile make cc -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.c 在包含文件 ./nokogiri.h 中从第75行开始, 来自 ./xml_document_fragment.h:4, 来自 xml_document_fragment.c:1: ./xml_document.h:5:16: 错误:没有此类型的文件或目录 make: *** [xml_document_fragment.o] Error 1
Gem文件将保留在 /usr/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.4.1 中,以供检查。 结果已记录到 /usr/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.4.1/ext/nokogiri/gem_make.out
"
这是我得到的结果:
这是否有人能解决?
- 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
- make -v:GNU Make 3.81
- gem env:
- 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
- GEM PATHS:
- /usr/lib/ruby1.9/gems/1.9.0
- /root/.gem/ruby/1.9.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :benchmark => false
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
当我尝试运行以下简单命令时:
gem install nokogiri
这是我得到的内容:
# gem install nokogiri 正在构建本地扩展,可能需要一些时间... 错误:无法安装nokogiri: 错误:构建gem本地扩展失败。/usr/bin/ruby1.9 extconf.rb 在 /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 中查找iconv.h... 找到了 在 /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 中查找libxml/parser.h... 找到了 在 /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 中查找libxslt/xslt.h... 找到了 在 /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 中查找libexslt/exslt.h... 找到了 在 -lxml2 中查找xmlParseDoc()... 找到了 在 -lxslt 中查找xsltParseStylesheetDoc()... 找到了 在 -lexslt 中查找exsltFuncRegister()... 找到了 检查xmlRelaxNGSetParserStructuredErrors()... 找到了 检查xmlRelaxNGSetParserStructuredErrors()... 找到了 检查xmlRelaxNGSetValidStructuredErrors()... 找到了 检查xmlSchemaSetValidStructuredErrors()... 找到了 检查xmlSchemaSetParserStructuredErrors()... 找到了 正在创建Makefile make cc -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.c 在包含文件 ./nokogiri.h 中从第75行开始, 来自 ./xml_document_fragment.h:4, 来自 xml_document_fragment.c:1: ./xml_document.h:5:16: 错误:没有此类型的文件或目录 make: *** [xml_document_fragment.o] Error 1
Gem文件将保留在 /usr/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.4.1 中,以供检查。 结果已记录到 /usr/lib/ruby1.9/gems/1.9.0/gems/nokogiri-1.4.1/ext/nokogiri/gem_make.out
"
“gem_make.out”文件包含与上述描述完全相同的信息。
如果我尝试使用另一个gem:
"gem install gherkin
这是我得到的结果:
u# gem install gherkin 正在构建本地扩展。这可能需要一段时间... 错误:安装gherkin失败: 错误:构建gem本地扩展失败。实际上,每当我尝试安装带有本地扩展的gem时,我都会遇到相同类型的错误。
/usr/bin/ruby1.9 extconf.rb checking for main() in -lc... yes creating Makefile make cc -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: error: re.h : No such file or directory make: *** [gherkin_lexer_ar.o] Error 1
Gem文件将保留在/usr/lib/ruby1.9/gems/1.9.0/gems/gherkin-1.0.30中以供检查。 结果记录在/usr/lib/ruby1.9/gems/1.9.0/gems/gherkin-1.0.30/ext/gherkin_lexer_ar/gem_make.out中。
这是否有人能解决?