繁体   English   中英

在安装Opengraph Gem时出错

[英]Getting errors while installing Opengraph Gem

尝试安装opengraph gem时出现以下错误:

gem install opengraphBuilding native extensions.  This could take a while...
ERROR:  Error installing opengraph:
    ERROR: Failed to build gem native extension.

details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-xslt-dir
    --without-xslt-dir
    --with-xslt-include
    --without-xslt-include=${xslt-dir}/include
    --with-xslt-lib
    --without-xslt-lib=${xslt-dir}/lib


Gem files will remain installed in /home/faraz/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.4.7 for inspection.
Results logged to /home/faraz/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.4.7/ext/nokogiri/gem_make.out

这是我的设置:

  • 操作系统:Linux Mint 64bit。
  • 红宝石:1.9.3
  • Rails 3.2.3
  • 红宝石:2.1.0

请帮忙。

编辑

如下面的答案所述,这是/home/faraz/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.4.7/ext/nokogiri/gem_make.out中的日志:

....../bin/ruby extconf.rb extconf.rb:10: Use RbConfig instead of obsolete and deprecated Config.
checking for libxml/parser.h... yes
checking for libxslt/xslt.h... no
 ----- libxslt is missing

日志文件中还有其他类似的行。

从上面的日志中,应该清楚,由于nokigiri安装失败,opengraph安装失败。 接下来,您应该打开/home/faraz/.rvm/gems/ruby-1.9.3-p448/gems/nokogiri-1.4.7/ext/nokogiri/gem_make.out并告诉我们那里记录的错误。 我有一种直觉,即您的机器上没有xml工具。 来自该文件的日志消息将对其进行确认。

要安装nokogiri,您需要已经安装了一些软件包:运行以下命令以立即安装它们:

sudo apt-get install libxslt1-dev libxml2-dev

之后,执行gem install nokogiri ,如果有任何错误,请再次报告。 如果没有,您可以返回安装opengraph。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM