title: Missing libstdc++ when installing taglib-ruby gem on Ubuntu 12.04?
body: <p>I'm trying to install <a href="https://github.com/robinst/taglib-ruby" rel="nofollow">taglib-ruby</a> but keep getting the same errors:</p>
  
  <pre><code>xyz@ubuntu:~$ sudo gem install taglib-ruby
  Building native extensions.  This could take a while...
  ERROR:  Error installing taglib-ruby:
      ERROR: Failed to build gem native extension.
  
          /usr/bin/ruby1.9.1 extconf.rb
  checking for main() in -lstdc++... no
  You must have libstdc++ installed.
  *** 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
      --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-tag-dir
      --without-tag-dir
      --with-tag-include
      --without-tag-include=${tag-dir}/include
      --with-tag-lib
      --without-tag-lib=${tag-dir}/lib
      --with-stdc++lib
      --without-stdc++lib
  
  
  Gem files will remain installed in /var/lib/gems/1.9.1/gems/taglib-ruby-0.6.0 for inspection.
  Results logged to /var/lib/gems/1.9.1/gems/taglib-ruby-0.6.0/ext/taglib_base/gem_make.out
  </code></pre>
  
  <p>mkmf.log says the following:</p>
  
  <pre><code>have_library: checking for main() in -lstdc++... -------------------- no
  
  "gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -I/usr/local/include -I/opt/local/include -I/sw/include  -D_FILE_OFFSET_BITS=64  -fno-strict-aliasing -g -g -O2 -fPIC conftest.c  -L. -L/usr/lib -L/usr/local/lib -L/opt/local/lib -L/sw/lib -L.  -rdynamic -Wl,-export-dynamic     -lruby-1.9.1  -lpthread -lrt -ldl -lcrypt -lm   -lc"
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: int main() {return 0;}
  /* end */
  
  "gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -I/usr/local/include -I/opt/local/include -I/sw/include  -D_FILE_OFFSET_BITS=64  -fno-strict-aliasing -g -g -O2 -fPIC conftest.c  -L. -L/usr/lib -L/usr/local/lib -L/opt/local/lib -L/sw/lib -L.  -rdynamic -Wl,-export-dynamic     -lruby-1.9.1 -lstdc++  -lpthread -lrt -ldl -lcrypt -lm   -lc"
  /usr/bin/ld: cannot find -lstdc++
  collect2: ld returned 1 exit status
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: /*top*/
  4: int main() {return 0;}
  5: int t() { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
  /* end */
  
  "gcc -o conftest -I/usr/include/ruby-1.9.1/i686-linux -I/usr/include/ruby-1.9.1/ruby/backward -I/usr/include/ruby-1.9.1 -I. -I/usr/local/include -I/opt/local/include -I/sw/include  -D_FILE_OFFSET_BITS=64  -fno-strict-aliasing -g -g -O2 -fPIC conftest.c  -L. -L/usr/lib -L/usr/local/lib -L/opt/local/lib -L/sw/lib -L.  -rdynamic -Wl,-export-dynamic     -lruby-1.9.1 -lstdc++  -lpthread -lrt -ldl -lcrypt -lm   -lc"
  /usr/bin/ld: cannot find -lstdc++
  collect2: ld returned 1 exit status
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: /*top*/
  4: int main() {return 0;}
  5: int t() { main(); return 0; }
  /* end */
  
  --------------------
  </code></pre>
  
  <p>I followed the instructions in the readme, installing <code>libtag1-dev</code> and double checked if I had libstdc++ installed which I do (I even looked in the Ubuntu Software Center if I missed a file).
  The only similar issue I found was <a href="https://github.com/robinst/taglib-ruby/issues/7" rel="nofollow">this one</a> but I already tried explictly defining the <code>opt-dir</code> and <code>opt-include</code> which didn't help either.</p>
  
  <p>I have to admit that I am not really familiar with the topic or even Ubuntu, so it might as well be possible that I simply overlooked or totally missed something obvious about the error message.</p>