Cannot gem install ruby-augeas on Ubuntu - ruby

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.

Related

Charlock_holmes installation error, Windows 11

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

Installing Ruby Gem Not working on OSX 10.10 Yosemite

I am trying to install Github Linguist ruby gem through terminal in Mac .
I don't have enough points to upload image so please bear with me.
This is error it is showing when I install it in terminal :-
bash-3.2# gem install github-linguist
Building native extensions. This could take a while...
ERROR: Error installing github-linguist:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150321-444-15aw05d.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=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
--use-system-libraries
extconf failed, exit code 1
Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/rugged-0.22.1b1 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/rugged-0.22.1b1/gem_make.out
brew install cmake should do the trick
I know you are not asking how to manager Ruby's versions.
but starting to use RVM will help a lot.

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).

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..

Not able to install hbase-stargate gem

I am trying to install hbase-stargate gem on my hadoop machine having centos-5.8 OS. Hbase is already installed. I am getting below errors.
gem install hbase-stargate
Building native extensions. This could take a while...
ERROR: Error installing hbase-stargate:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb
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=/usr/bin/ruby
--with-curl-dir
--without-curl-dir
--with-curl-include
--without-curl-include=${curl-dir}/include
--with-curl-lib
--without-curl-lib=${curl-dir}/lib
--with-curllib
--without-curllib
extconf.rb:34: 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 /usr/lib64/ruby/gems/1.8/gems/patron-0.4.18 for inspection.
Results logged to /usr/lib64/ruby/gems/1.8/gems/patron-0.4.18/ext/patron/gem_make.out
Its giving errors about libcurl however libcurl and libcurl-devel package is also there...
I also got this error while installing 'patron' gem on Ubuntu 12.04 with Rails 3.2.12.
I fixed this issue using:
sudo apt-get install libcurl3-dev
and then:
bundle
I hope it will be helpfull

Resources