Unable to install package due to uninstalled (0.0.5) gem

I installed ruby ​​1.9.3p327 and rails 3.2.8 using rvm on centos 6.3. But when installing the package for a specific project folder, the process fails when it tries to install gem unf_ext 0.0.5 and produces the following error,

Setting unf_ext (0.0.5) with native extensions Gem :: Installer :: ExtensionBuildError: ERROR: Failed to create native extension gem.

/home/rradmin/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb -fPIC checking for main() in -lstdc++... yes checking for ruby/encoding.h... yes creating Makefile make compiling unf.cc cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++ In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/vector:61, from unf/normalizer.hh:4, from unf.cc:1: ..... .... ... 

Gem files will remain installed in /home/rradmin/.rvm/gems/ruby-1.9.3-p327@r32/gems/unf_ext-0.0.5 for verification. Results recorded in /home/rradmin/.rvm/gems/ruby-1.9.3-p327@r32/gems/unf_ext-0.0.5/ext/unf_ext/gem_make.out

An error occurred while setting un_ext (0.0.5), and the Bundler cannot Continue. Make sure gem install unf_ext -v '0.0.5' succeeds before binding.

I also tried setting un_ext separately, as mentioned above, but got the same error. I called https://github.com/cowboyd/therubyracer/issues/135 but still not able to solve the problem. Please let me know how to solve this problem.

Thanks.

+8
source share
4 answers

Thanks, Suman. But I solved the problem by installing libstdC ++ - devel using yum install gcc-g ++ libstdC ++ - devel.

0
source share

On Ubuntu, I only needed to

 sudo apt-get install build-essential 

to fix it.

(for the record, I'm on a newly built Ubuntu 12.10 X64 server)

+18
source share

This error occurs when you do not have helper libraries for compiling gems trying to install the following packages.

 sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison 

then install the package

+1
source share

I solved the problem by installing libstdc ++ - devel using yum install gcc-c++ libstdc++-devel

0
source share

All Articles