我在我的機器上安裝了JRuby MySQL gem。然而,由於某種原因,我不得不改變,以紅寶石,而不是JRuby和一切似乎是工作的罰款,除了MySQL的寶石對Ruby沒有安裝,現在當我嘗試安裝它,我得到以下錯誤:安裝MySQL gem for Ruby和JRuby gem
Building native extensions. This could take a while...
ERROR: Error installing mysql:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb --with-mysql-dir=/usr/include/mysql
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... yes
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lmygcc... no
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
我搜索了一下,發現我可能需要安裝libmysqlclient12-dev
包。
但當我這樣做,我得到了以下錯誤:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libmysqlclient12-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package libmysqlclient12-dev has no installation candidate
現在我似乎碰壁,而不是與此向前邁進。任何指針或幫助將不勝感激。
Cheers