无法安装charlock holmes gem,libicu-devel安装

时间:2013-09-04 18:13:19

标签: ruby rubygems fedora gitlab

我正在尝试安装charlock holmes,然而,我一直收到错误:

[root@hugovm gitlab]# gem install charlock_holmes --version '0.6.9.4'
Building native extensions.  This could take a while...
ERROR:  Error installing charlock_holmes:
    ERROR: Failed to build gem native extension.

    /usr/bin/ruby extconf.rb
checking for main() in -licui18n... yes
checking for main() in -licui18n... yes
checking for unicode/ucnv.h... yes
  -- tar zxvf file-5.08.tar.gz
  -- ./configure --prefix=/usr/local/share/gems/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/dst/ --disable-shared --enable-static --with-pic
  -- patch -p0 < ../file-soft-check.patch
*** 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}/lib64
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=/usr/bin/ruby
    --with-icu-dir
    --without-icu-dir
    --with-icu-include
    --without-icu-include=${icu-dir}/include
    --with-icu-lib
    --without-icu-lib=${icu-dir}/
    --with-icui18nlib
    --without-icui18nlib
    --with-icui18nlib
    --without-icui18nlib
extconf.rb:7:in `sys': patch -p0 < ../file-soft-check.patch failed, please report issue on http://github.com/brianmario/charlock_holmes (RuntimeError)
    from extconf.rb:61:in `block (2 levels) in <main>'
    from extconf.rb:59:in `chdir'
    from extconf.rb:59:in `block in <main>'
    from extconf.rb:55:in `chdir'
    from extconf.rb:55:in `<main>'


Gem files will remain installed in /usr/local/share/gems/gems/charlock_holmes-0.6.9.4 for inspection.
Results logged to /usr/local/share/gems/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/gem_make.out

我已经安装了libicu-devel。

由于

3 个答案:

答案 0 :(得分:7)

今天我遇到了同样的问题。试图在干净的fedora机器上安装gitlab。 对我来说,/usr/local/share/gems/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/gem_make.out中的一行指向mkmf.log,它与上面的日志文件位于同一目录中。

在那里说“补丁:命令未找到”

  

sudo yum install patch

答案 1 :(得分:2)

在你的输出中,我可以阅读:

  

extconf.rb:7:在`sys'中:patch -p0&lt; ../file-soft-check.patch失败,请报告http://github.com/brianmario/charlock_holmes上的问题(RuntimeError)

所以这一切都指向一个错误。我想这是一个好主意,按照输出并在那里创建一个问题,解释你想要做什么,并提供你的环境的详细信息。

答案 2 :(得分:2)

缺少ruby-devel

yum install ruby-devel

你将被设置:)