Missing libstdc++ during gem install id3lib-ruby

I'm trying to install id3lib-ruby, but I'm getting this error:

Building native extensions.  This could take a while...
ERROR:  Error installing id3lib-ruby:
    ERROR: Failed to build gem native extension.

        /home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/bin/ruby extconf.rb
checking for main() in -lstdc++... no
You must have libstdc++ installed.
*** extconf.rb failed ***

I've got all kinds of libstdc++ installed:

$ apt-cache search libstdc | grep dev
lib32gmp-dev - Multiprecision arithmetic library developers tools (32bit)
libgmp-dev - Multiprecision arithmetic library developers tools
libstdc++6-4.4-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.6-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.7-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.5-dev - GNU Standard C++ Library v3 (development files)
libstdc++6-4.6-dev-armel-cross - GNU Standard C++ Library v3 (development files)
libstdc++6-4.6-dev-armhf-cross - GNU Standard C++ Library v3 (development files)
libstdc++6-4.7-dev-armel-cross - GNU Standard C++ Library v3 (development files)
libstdc++6-4.7-dev-armhf-cross - GNU Standard C++ Library v3 (development files)

Here's the mkmf.log:

have_library: checking for main() in -lstdc++... -------------------- no

"/usr/bin/gcc-4.6 -o conftest -I/opt/local/include -I. -I/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/x86_64-linux -I. -I/usr/local/include -I/opt/local/include -I/sw/include    -g -O2    conftest.c  -L. -L/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -Wl,-R/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L/opt/local/lib -Wl,-R/opt/local/lib -L/sw/lib -Wl,-R/sw/lib -L.  -rdynamic -Wl,-export-dynamic     -lruby-static -lstdc++  -L/opt/local/lib -lrt -ldl -lcrypt -lm   -lc"
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
/* end */

"/usr/bin/gcc-4.6 -o conftest -I/opt/local/include -I. -I/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib/ruby/1.8/x86_64-linux -I. -I/usr/local/include -I/opt/local/include -I/sw/include    -g -O2    conftest.c  -L. -L/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -Wl,-R/home/rfischer/.rvm/rubies/ree-1.8.7-2012.02/lib -L/usr/local/lib -Wl,-R/usr/local/lib -L/opt/local/lib -Wl,-R/opt/local/lib -L/sw/lib -Wl,-R/sw/lib -L.  -rdynamic -Wl,-export-dynamic     -lruby-static -lstdc++  -L/opt/local/lib -lrt -ldl -lcrypt -lm   -lc"
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
checked program was:
/* begin */
1: /*top*/
2: int main() { return 0; }
3: int t() { main(); return 0; }
/* end */

--------------------

Any idea on what I'm doing wrong or how to fix it?

Answers


You probably solved your problem in the meantime, but since I had a similar issue recently and got help here, I thought I might share that apt-get install build-essential solved my missing libstdc++ error.


Need Your Help

php mixed associative array containing text and image

php

can you have a associative array containing text in the first element and a image in the 2nd.

Python, ROOT, and MINUIT integration?

python wrapping data-analysis root-framework

I'm a modest graduate student in a high energy particle physics department. With an unfounded distaste for C/C++ and a founded love of python, I have resorted to python for my data analysis so far ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.