Saturday, June 14, 2008

undefined symbol: __pure_virtual

While trying to install mysql dbd module for ruby I encountered the following error:
/usr/local/ruby/lib/ruby/site_ruby/1.8/i686-linux/ /usr/local/ruby/lib/                                           ruby/site_ruby/1.8/i686-linux/ undefined symbol: __pure_virtual - /usr/                                           local/ruby/lib/ruby/site_ruby/1.8/i686-linux/ (LoadError)        from ruby-db-client.rb:4

After some googling I found this is a problem with mysql 5.0.22. I was able to fix it by modyfing /usr/local/mysql/bin/mysql_config and adding -lgcc to the libs argument.

After reinstalling ruby everything worked fine.

No comments: