Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install charlock holmes gem, libicu-devel installed

I am trying to install charlock holmes, nevertheless, I keep getting an error:

[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

I already installed libicu-devel.

Thanks

like image 245
hugohabel Avatar asked Sep 04 '13 18:09

hugohabel


3 Answers

I had the exact same issue today. Tried to install gitlab on a clean fedora machine. For me, a line in /usr/local/share/gems/gems/charlock_holmes-0.6.9.4/ext/charlock_holmes/gem_make.out pointed to mkmf.log, which is in the same directory as above log file.

There it said "patch: command not found"

sudo yum install patch

like image 81
fholzer Avatar answered Oct 17 '22 21:10

fholzer


In you output I can read:

extconf.rb:7:in `sys': patch -p0 < ../file-soft-check.patch failed, please report issue on http://github.com/brianmario/charlock_holmes (RuntimeError)

So it all points to a bug. I suppose it is a good idea follow the output and created an issue there, explaining what you are trying to do and giving details of your environment.

like image 39
fotanus Avatar answered Oct 17 '22 21:10

fotanus


ruby-devel is missing

yum install ruby-devel

and you'll be set :)

like image 38
axil Avatar answered Oct 17 '22 22:10

axil