Charlock_holmes installation error, Windows 11 - ruby

I am trying to install the Charlock_holmes dependency but I keep getting this error:
$ gem install charlock_holmes -- --with-icui18nlib=icuin --with-icudatalib=icudt
Temporarily enhancing PATH for MSYS/MINGW...
Building native extensions with: '--with-icui18nlib=icuin --with-icudatalib=icudt'
This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
current directory: C:/Ruby31-x64/lib/ruby/gems/3.1.0/gems/charlock_holmes-0.7.7/ext/charlock_holmes
C:/Ruby31-x64/bin/ruby.exe -I C:/Ruby31-x64/lib/ruby/site_ruby/3.1.0 extconf.rb --with-icui18nlib\=icuin --with-icudatalib\=icudt
checking for -licuin... 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=C:/Ruby31-x64/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-icu-i18n-dir
--without-icu-i18n-dir
--with-icu-i18n-include
--without-icu-i18n-include=${icu-i18n-dir}/include
--with-icu-i18n-lib
--without-icu-i18n-lib=${icu-i18n-dir}/lib
--with-icu-i18n-config
--without-icu-i18n-config
etc
I spent a good couple of hours looking for a solution but with no luck.
I already tried:
Installing icu4c from https://github.com/unicode-org/icu/releases/tag/release-71-1 and put the path in "--with-icu-lib"
using:
ridk exec pacman -S mingw-w64-x86_64-icu icu-devel icu
gem install charlock_holmes -- --with-icui18nlib=icuin --with-icudatalib=icudt

Related

Ruby missing taglib error

On my Ubuntu 14.04 I installed Ruby 2.2.0 using RVM.
I have installed the "taglib" using following command sudo apt-get install libtag1-dev.
However when I try to install a gem I get the following error:
> gem install stream2tracks
Building native extensions. This could take a while...
ERROR: Error installing stream2tracks:
ERROR: Failed to build gem native extension.
/home/dash/.rvm/rubies/ruby-2.2.0-dev/bin/ruby -r ./siteconf20150207-2313-h67sa7.rb extconf.rb
checking for ruby.h... yes
checking for taglib/tag_c.h... no
*** 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=/home/dash/.rvm/rubies/ruby-2.2.0-dev/bin/$(RUBY_BASE_NAME)
extconf failed, exit code 1
Gem files will remain installed in /home/dash/.rvm/gems/ruby-2.2.0-dev/gems/taglib2-0.1.5 for inspection.
You need to install libtagc0-dev to get TagLib's C header (the one the gem is checking for).

Failed to install Ruby gem curb on windows 8

I'm trying to install the curb gem on windows 8 but it returns errors. I was also trying by providing option like --with-curl-dir, --with-curl-lib, --with-curl-include but not working. Every time it return the error.Please give any suggestion. Thanks
C:\Users>gem install curb -- --with-curl-lib=C:/curl-7.21.0-devel-mingw32/bin --with-curl-include=C:/curl-7.21.0-devel-mingw32/include
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
C:/Ruby193/bin/ruby.exe extconf.rb --with-curl-lib=C:/curl-7.21.0-devel-mingw32/bin --with-curl-include=C:/curl-7.21.0-devel-mingw32/include
checking for curl-config... no
checking for main() in -lcurl... no
*** 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=C:/Ruby193/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include=${curl-dir}/include
--with-curl-lib=${curl-dir}/lib
--with-curllib
--without-curllib
extconf.rb:23:in `<main>': Can't find libcurl or curl/curl.h (RuntimeError)
Try passing --with-curl-dir or --with-curl-lib and --with-curl-include
options to extconf.
Gem files will remain installed in C:/Ruby193/lib/ruby/gems/1.9.1/gems/curb-0.8.6 for inspection.
Results logged to C:/Ruby193/lib/ruby/gems/1.9.1/gems/curb-0.8.6/ext/gem_make.out
You should have curl library installed on you machine in root directory then try following command in command prompt
gem install curb -v 0.8.6 --platform=ruby -- --with-curl-lib=C:/curl-7.34.0-devel-mingw32/bin --with-curl-include=C:/curl-7.34.0-devel-mingw32/include

Memcached gem installation error in windows8

Am trying to install memcached gem in my windows 8.Am getting following error while executing the command gem install memcached
I already installed Devkit and using ruby1.9.3
C:\Users\aran>gem install memcached
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while.
..
ERROR: Error installing memcached:
ERROR: Failed to build gem native extension.
C:/ProgramData/RailsInstaller/Ruby1.9.3/bin/ruby.exe extconf.rb
checking for sasl/sasl.h... no
Please install SASL to continue. The package is called libsasl2-dev on Ubuntu an
d cyrus-sasl on Gentoo.
*** 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=C:/ProgramData/RailsInstaller/Ruby1.9.3/bin/ruby
Gem files will remain installed in C:/ProgramData/RailsInstaller/Ruby1.9.3/lib/r
uby/gems/1.9.1/gems/memcached-1.6.1 for inspection.
Results logged to C:/ProgramData/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/ge
ms/memcached-1.6.1/ext/gem_make.out
How can i rectify this error??
On Fedora, I installed cyrus-sasl-devel. There might be same or something equivalent on Windows too...give it a try..

Gem Charlock_holmes installation error on Windows XP

I am trying to run bundler for my RoR app on a Windows machine (Windows XP). But, while downloading the gems, it stops at the gem Charlock_Holmes and gives the following error.
'Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.
C:/Ruby192/bin/ruby.exe extconf.rb
checking for main() in -licui18n... no
which: no brew in (.;C:\Devkit\bin;C:\Devkit\mingw\bin;C:\Ruby192\bin;C:\WINDOWS
\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Git\cmd;C:\TCWIN4
5\BIN)
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=C:/Ruby192/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}/lib
--with-icui18nlib
--without-icui18nlib
--with-icui18nlib
--without-icui18nlib
Gem files will remain installed in C:/Ruby192/lib/ruby/gems/1.9.1/gems/charlock_
holmes-0.6.9 for inspection.
Results logged to C:/Ruby192/lib/ruby/gems/1.9.1/gems/charlock_holmes-0.6.9/ext/
charlock_holmes/gem_make.out
An error occurred while installing charlock_holmes (0.6.9), and Bundler cannot c
ontinue.
Make sure that `gem install charlock_holmes -v '0.6.9'` succeeds before bundling'
Can you please help me figure out where the problem is ?
icu required (brew install icu4c or apt-get install libicu-dev)
As is stated in your question, you need libicu-dev. If you are using Cygwin you can install the package
cygwin.com/packages/x86/libicu-devel

Cannot gem install ruby-augeas on Ubuntu

I am trying to install augeas on Ubuntu.
sudo gem install ruby-augeas
This gives me the error:
Building native extensions. This could take a while...
ERROR: Error installing ruby-augeas:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
*** 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/ruby1.9.1
--with-augeas-config
--without-augeas-config
--with-pkg-config
--without-pkg-config
extconf.rb:27:in `<main>': augeas-devel not installed (RuntimeError)
I had
sudo apt-get install ruby1.8-dev ruby1.9.1-dev augeas-tools libaugeas-dev
Btw, where is the mkmf.log file?
How should I install augeas? I need to install it using gem as this will be used for Puppet's version of Ruby.
you need at least build-essential package to compile native extensions. Also make sure you have all the ruby base libraries precompiled (or in the rvm).
Try to install rvm itself, it will give you a list of required packages just after installation.

Resources