0
試圖使用寶石「mysql的」連接到DB寶石MySQL連接錯誤
/home/sajeesh/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': libperconaserverclient.so.18: cannot open shared object file: No such file or directory - /home/sajeesh/.rvm/gems/[email protected]/gems/mysql-2.9.1/lib/mysql/mysql_api.so (LoadError)
from /home/sajeesh/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /home/sajeesh/.rvm/gems/[email protected]/gems/mysql-2.9.1/lib/mysql.rb:6:in `rescue in <top (required)>'
from /home/sajeesh/.rvm/gems/[email protected]/gems/mysql-2.9.1/lib/mysql.rb:2:in `<top (required)>'
from /home/sajeesh/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:133:in `require'
from /home/sajeesh/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:133:in `rescue in require'
from /home/sajeesh/.rvm/rubies/ruby-2.1.4/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:40:in `require'
from ./mysql.rb:7:in `<main>'
-bash-4.1$
-bash-4.1$ ruby -v
ruby 2.1.4p265 (2014-10-27 revision 48166) [x86_64-linux]
-bash-4.1$ gem list | grep mysql
mysql (2.9.1)
-bash-4.1$
我收到錯誤是否有任何可能的解決方法這一點;我已經卸載並安裝了多次mysql gem,並且也嘗試了更高版本的ruby;似乎沒有任何工作。請幫助我解決方案。
你的mysql實例是什麼版本? – digicazter
其服務器版本:5.6.34-79.1 –
我剛纔看到了,但是你使用'gem'mysql''還是'gem'mysql2''?因爲如果你使用'mysql',然後把它改爲'mysql2'和bundle,那麼試試吧。 – digicazter