2011-01-11 16 views
6

Rubyの新機能です。 DataMapperをインストールしましたが、dm-mysql-adapter-1.0.2 gemをインストールしようとしています。しかし、私がインストールしようとすると、私は以下のエラーを取得します。私はubuntu OSを使用しています。dm-mysql-adapterをインストールする際のエラー

[email protected]:~/Downloads$ gem install dm-mysql-adapter-1.0.2 -- --with-mysql-     lib=/usr/lib/mysql -- --with-mysql-conf=/usr/bin/mysql 
WARNING: Installing to ~/.gem since /home/vinoth/gems and 
/home/vinoth/gems/bin aren't both writable. 
WARNING: You don't have /home/vinoth/.gem/ruby/1.8/bin in your PATH, 
gem executables will not run. 
Building native extensions. This could take a while... 
ERROR: Error installing dm-mysql-adapter-1.0.2: 
ERROR: Failed to build gem native extension. 

/usr/bin/ruby1.8 extconf.rb --with-mysql-lib=/usr/lib/mysql -- --with-mysql-  conf=/usr/bin/mysql 
checking for mysql_query() in -lmysqlclient... 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 
    - ........ 


Gem files will remain installed in /home/vinoth/.gem/ruby/1.8/gems/do_mysql-0.10.2 for inspection. 
Results logged to /home/vinoth/.gem/ruby/1.8/gems/do_mysql-0.10.2/ext/do_mysql/gem_make.out 

私に何かが不足していますか?

追加情報

ルビーバージョン:ルビー1.8.7(2010-01-10パッチレベル249)[i486の-linuxの]
宝石のバージョン:1.3.5

答えて

11

はmysql devパッケージがインストールされている必要があります。

sudo apt-get install libmysqlclient-dev 

トリックを行う必要があります

+0

ありがとう助け:) – vinoth

関連する問題