Open mcandre opened 5 years ago
same
$ gem install charlock_holmes -v '0.7.6' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
current directory: /Users/onice/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/charlock_holmes-0.7.6/ext/charlock_holmes
/Users/onice/.rbenv/versions/2.3.6/bin/ruby -I /Users/onice/.rbenv/versions/2.3.6/lib/ruby/site_ruby/2.3.0 -r ./siteconf20190422-12714-1eiazht.rb extconf.rb
checking for main() in -licui18n... yes
checking for main() in -licui18n... yes
checking for unicode/ucnv.h... 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=/Users/onice/.rbenv/versions/2.3.6/bin/$(RUBY_BASE_NAME)
--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:
/Users/onice/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-18/2.3.0-static/charlock_holmes-0.7.6/mkmf.log
extconf failed, exit code 1
Gem files will remain installed in /Users/onice/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/gems/charlock_holmes-0.7.6 for inspection.
Results logged to /Users/onice/.rbenv/versions/2.3.6/lib/ruby/gems/2.3.0/extensions/x86_64-darwin-18/2.3.0-static/charlock_holmes-0.7.6/gem_make.out
It builds perfect with the following:
gem install charlock_holmes -- --with-icu-dir=/usr/local/opt/icu4c --with-cxxflags=-std=c++11
not for me ...
$ bundle exec gem install charlock_holmes -v '0.7.6' --source 'https://rubygems.org/'
Building native extensions. This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
current directory: /Users/jamesturley/Documents/ruby/ch/vendor/bundle/ruby/2.5.0/gems/charlock_holmes-0.7.6/ext/charlock_holmes
/opt/boxen/rbenv/versions/2.5.5/bin/ruby -r ./siteconf20190625-73172-e35q4a.rb extconf.rb
/opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:91:in `block in materialize': Could not find charlock_holmes-0.7.6 in any of the sources (Bundler::GemNotFound)
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:85:in `map!'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/spec_set.rb:85:in `materialize'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:170:in `specs'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:237:in `specs_for'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/definition.rb:226:in `requested_specs'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:108:in `block in definition_method'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/runtime.rb:20:in `setup'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler.rb:107:in `setup'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/gems/2.5.0/gems/bundler-1.17.3/lib/bundler/setup.rb:20:in `<top (required)>'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from /opt/boxen/rbenv/versions/2.5.5/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
extconf failed, exit code 1
Gem files will remain installed in /Users/jamesturley/Documents/ruby/ch/vendor/bundle/ruby/2.5.0/gems/charlock_holmes-0.7.6 for inspection.
Results logged to /Users/jamesturley/Documents/ruby/ch/vendor/bundle/ruby/2.5.0/extensions/x86_64-darwin-17/2.5.0-static/charlock_holmes-0.7.6/gem_make.out
Hi @tragiclifestories !
For me it worked after installing zlib1g-dev
Trace: