Failed to install charlock_holmes on Windows 8 due to missing zlib - ruby

I'm trying to install charlock_holmes on Windows 8, but I can't point it to a valid zlib binary. I tried vaiours dll's from Cygwin and from zlib.net, with no luck. The question is, how to link to zlib properly?
gem install charlock_holmes -- --with-icu-dir=D:\download\icu4c-4_0_1-Win64-msvc8\usr\local --with-icui18nlib=icuin --with-icudatalib=icudt --with-zlib=WHATHEVER_WONT_WORK
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing charlock_holmes:
ERROR: Failed to build gem native extension.
d:/bin/Ruby193/bin/ruby.exe extconf.rb --with-icu-dir=D:\download\icu4c-4_0_1-Win64-msvc8\usr\local --with-icui18nlib=icuin --with-icudatalib=icudt --with- zlib=WHATHEVER_WONT_WORK
checking for main() in -licuin... yes
checking for main() in -licuin... yes
checking for unicode/ucnv.h... yes
checking for main() in -lWHATHEVER_WONT_WORK... no
libz missing
*** 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=d:/bin/Ruby193/bin/ruby
--with-icu-dir
--with-icu-include
--without-icu-include=${icu-dir}/include
--with-icu-lib
--without-icu-lib=${icu-dir}/lib
--with-icui18nlib
--with-icui18nlib
--with-zlib
Gem files will remain installed in d:/bin/Ruby193/lib/ruby/gems/1.9.1/gems/charlock_holmes-0.7.3 for inspection.
Results logged to d:/bin/Ruby193/lib/ruby/gems/1.9.1/gems/charlock_holmes-0.7.3/ext/charlock_holmes/gem_make.out

libz.a goes to [devkit-dir]/mingw/lib, not [devkit-dir]/lib. Problem solved.

Related

Error installing therubyracer

I am having trouble installing therubyracer on Windows Server 2012 R2.
first, i tried with gem install therubyracer -v '0.12.3'
which gave this output:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb
checking for main() in -lpthread... no
checking for v8.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=C:/Ruby200/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
--without-v8-dir
--with-v8-include
--without-v8-include=${v8-dir}/include
--with-v8-lib
--without-v8-lib=${v8-dir}/
C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/ext/libv8/location.rb:50:in `configure': By using --with-system-v8, you have chosen to use the version (Libv8::Location::System::NotFoundError)
of V8 found on your system and *not* the one that is bundled with
the libv8 rubygem.
However, your system version of v8 could not be located.
Please make sure your system version of v8 that is compatible
with 3.16.14.17 installed. You may need to use the
--with-v8-dir option if it is installed in a non-standard location
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3/ext/v8/gem_make.out
Also tried gem install therubyracer -v '0.12.3' -- --with-v8-dir
which resulted in this output:
Temporarily enhancing PATH to include DevKit...
Building native extensions with: '--with-v8-dir'
This could take a while...
ERROR: Error installing therubyracer:
ERROR: Failed to build gem native extension.
C:/Ruby200/bin/ruby.exe extconf.rb --with-v8-dir
checking for main() in -lpthread... 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:/Ruby200/bin/ruby
--with-pthreadlib
--without-pthreadlib
--enable-debug
--disable-debug
--with-v8-dir
C:/Ruby200/lib/ruby/2.0.0/mkmf.rb:1665:in `dir_config': undefined method `split' for true:TrueClass (NoMethodError)
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/ext/libv8/location.rb:49:in `configure'
from C:/Ruby200/lib/ruby/gems/2.0.0/gems/libv8-3.16.14.17/lib/libv8.rb:7:in `configure_makefile'
from extconf.rb:32:in `<main>'
Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/gems/therubyracer-0.12.3/ext/v8/gem_make.out
If you need any further information please let me know.
The provided error means that you don't have g++ installed yet.
I think you need to first run this command:
sudo apt-get install g++

How to install curses gem on Windows

How to install curses gem on Windows?
I already tried to do everything mentioned in the answers from this question and still got the same error:
>E:\software\Ruby22\bin\gem install curses
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing curses:
ERROR: Failed to build gem native extension.
E:/software/Ruby22/bin/ruby.exe -r ./siteconf20160411-12372-2bgdm1.rb extconf.rb
checking for tgetent() in -ltinfo... no
checking for tgetent() in -ltermcap... no
checking for ncurses.h... no
checking for ncurses/curses.h... no
checking for ncursesw/curses.h... no
checking for curses_colr/curses.h... no
checking for curses.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=E:/software/Ruby22/bin/$(RUBY_BASE_NAME)
--with-curses-dir
--without-curses-dir
--with-curses-include
--without-curses-include=${curses-dir}/include
--with-curses-lib
--without-curses-lib=${curses-dir}/lib
--with-ncurses-dir
--without-ncurses-dir
--with-ncurses-include
--without-ncurses-include=${ncurses-dir}/include
--with-ncurses-lib
--without-ncurses-lib=${ncurses-dir}/lib
--with-termcap-dir
--without-termcap-dir
--with-termcap-include
--without-termcap-include=${termcap-dir}/include
--with-termcap-lib
--without-termcap-lib=${termcap-dir}/lib
--with-tinfolib
--without-tinfolib
--with-termcaplib
--without-termcaplib
extconf failed, exit code 1
Gem files will remain installed in E:/software/Ruby22/lib/ruby/gems/2.2.0/gems/curses-1.0.2 for inspection.
Results logged to E:/software/Ruby22/lib/ruby/gems/2.2.0/extensions/x86-mingw32/2.2.0/curses-1.0.2/gem_make.out

Could not create Makefile for some reason - Trying to install Ruby Gem

I'm having some trouble installing a Ruby Gem called Lingust for my Mac. I get the error message below and have no idea how to solve the issue. Any help would be greatly appreciated.
gem install github-linguist
Building native extensions. This could take a while...
ERROR: Error installing github-linguist:
ERROR: Failed to build gem native extension.
/Users/kanery/.rvm/rubies/ruby-2.0.0-p643/bin/ruby -r./siteconf20151008-9054-b4exbs.rb extconf.rb
checking for gmake... no
checking for make... yes
checking for cmake... no
ERROR: CMake is required to build Rugged.
*** 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/kanery/.rvm/rubies/ruby-2.0.0-p643/bin/ruby
--use-system-libraries
extconf failed, exit code 1
Gem files will remain installed in /Users/kanery/.rvm/gems/ruby-2.0.0-p643/gems/rugged-0.24.0b0 for inspection.
Reading the installation instructions of Rugged, you can see that both CMake and pkg-config are required. Looking at your error message, it seems like CMake is not installed on your system.
If you are using Homebrew, you can install it by running
brew install cmake
Or you can install it from the source following these instructions.

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

Resources