I am trying to install linguist on Ubuntu 17.10 (Linux 4.13.0-16-lowlatency #19-Ubuntu SMP PREEMPT Wed Oct 11 19:51:52 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux)
But it comes with the following errors:
Installing charlock_holmes 0.7.5 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /tmp/bundler20171027-16936-kh8cujcharlock_holmes-0.7.5/gems/charlock_holmes-0.7.5/ext/charlock_holmes
/usr/bin/ruby2.3 -r ./siteconf20171027-16936-mhapsh.rb extconf.rb
checking for main() in -licui18n... no
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}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/$(RUBY_BASE_NAME)2.3
--with-icu-dir
--without-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/lib
--with-icui18nlib
--without-icui18nlib
--with-icui18nlib
--without-icui18nlib
To see why this extension failed to compile, please check the mkmf.log which can be found here:
/tmp/bundler20171027-16936-kh8cujcharlock_holmes-0.7.5/extensions/x86_64-linux/2.3.0/charlock_holmes-0.7.5/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /tmp/bundler20171027-16936-kh8cujcharlock_holmes-0.7.5/gems/charlock_holmes-0.7.5 for inspection.
Results logged to /tmp/bundler20171027-16936-kh8cujcharlock_holmes-0.7.5/extensions/x86_64-linux/2.3.0/charlock_holmes-0.7.5/gem_make.out
An error occurred while installing charlock_holmes (0.7.5), and Bundler cannot continue.
Make sure that `gem install charlock_holmes -v '0.7.5'` succeeds before bundling.
In Gemfile:
gto was resolved to 0.1.0, which depends on
github-linguist was resolved to 5.3.1, which depends on
charlock_holmes
My guess is it relates to #3777?
You need to install libicu-dev.
I encounter the same problem on Windows. gem doesn't find libicu-dev when I try to install it. Any suggestions?