Error installing charlock_holmes : Error installin

2019-04-04 04:39发布

I am trying to install GITLAB. I get this error executing "sudo gem install charlock_holmes --version '0.6.9'" (section Install Gems)

GEOGIT:/geogit/Administrative_Tools # sudo gem install charlock_holmes --version '0.6.9'
Building native extensions.  This could take a while...
ERROR:  Error installing charlock_holmes:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby1.9 extconf.rb
checking for main() in -licui18n... no
which: no brew in (/usr/sbin:/bin:/usr/bin:/sbin)
checking for main() in -licui18n... no

***************************************************************************************
*********** icu required (brew install icu4c or apt-get install libicu-dev) ***********
***************************************************************************************
*** 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}/
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=/usr/bin/ruby1.9
        --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

Gem files will remain installed in /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9 for inspection.
Results logged to /usr/lib64/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/charlock_holmes/gem_make.out

Someone, can help me debug those logs and error?

标签: gitlab
6条回答
三岁会撩人
2楼-- · 2019-04-04 05:11

According to the documentation (https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md) the package libicu-dev is required

Install it with "apt-get install libicu-dev" and then charlock_holmes could be installed

查看更多
一夜七次
3楼-- · 2019-04-04 05:14

I got the same mistake on a Centos 5.4 server, the yum repository only have the icu version 3.6, so i have to search and install manually the library icu 4.2 which solve the problem. In case someone else need to know how to do it, i recommend to check this link http://source.icu-project.org/repos/icu/icu/tags/release-4-2-1/readme.html#HowToBuildUNIX

查看更多
叛逆
4楼-- · 2019-04-04 05:23

For MacOS install the following dependency:

brew install icu4c
查看更多
Explosion°爆炸
5楼-- · 2019-04-04 05:25

I used "yum install libicu-devel" and then I could install charlock_holmes

查看更多
你好瞎i
6楼-- · 2019-04-04 05:35

I had kind of the same problem: when I was trying to install charlock_holmes gem, I had this error:

charlock_holmes-0.7.3/mkmf.log
have_library: checking for main() in -licui18n... -------------------- no  

I fixed it by running the first command of @VonC:

  sudo apt-get install libicu-dev  

Hope I helped someone!

查看更多
Viruses.
7楼-- · 2019-04-04 05:36

This looks like issue 1952

It was actually weirdness with the way my ubuntu VPS is commissioned. Mine did not come with a C compiler or libdev obviously.

The problem fix I found was to install libdev first, then the GCC
Then apt-get install libicu-dev.

Update 2015: additional comments include:

yum install libicu-devel worked for me

You just need to make sure "patch" is installed (yum install patch) then it should work

查看更多
登录 后发表回答