Nando
Nando

Reputation: 747

libmysqlclient_r.so.15: cannot open shared object file: No such file or directory Dreamhost

My rails app was working fine, but recently Dreamhost move out theirs servers (*something like that), now i can't deploy via capistrano..

i got this error message:

libmysqlclient_r.so.15: cannot open shared object file: No such file or directory - /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.so

raw version:

[direct.soprojetos.com.br] executing command ** [out :: direct.soprojetos.com.br] /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler.rb:199: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/bundler/gems/capistrano-ea5b03b4d38e/capistrano.gemspec:15: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/bundler/gems/kendoui_rails-dc276aceb446/kendoui-rails.gemspec:18: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/bundler/gems/pagseguro-fa2c22e88177/pagseguro.gemspec:15: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] /usr/lib/ruby/gems/1.8/gems/bundler-1.0.7/lib/bundler/runtime.rb:132: warning: Insecure world writable dir /home/soprojetos/cap/shared/bundle/ruby/1.8/bin in PATH, mode 040777 ** [out :: direct.soprojetos.com.br] rake aborted! ** [out :: direct.soprojetos.com.br] libmysqlclient_r.so.15: cannot open shared object file: No such file or directory - /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.so ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2/mysql2.so ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/shared/bundle/ruby/1.8/gems/mysql2-0.3.11/lib/mysql2.rb:9 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/releases/20130208183759/config/application.rb:14 ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/releases/20130208183759/Rakefile:5:inrequire' ** [out :: direct.soprojetos.com.br] /home/soprojetos/cap/releases/20130208183759/Rakefile:5 ** [out :: direct.soprojetos.com.br] (See full trace by running task with --trace) command finished in 9957ms * [deploy:update_code] rolling back * executing "rm -rf /home/soprojetos/cap/releases/20130208183759; true" servers: ["direct.soprojetos.com.br"] [direct.soprojetos.com.br] executing command command finished in 13266ms * [pushover:notify_deploy_started] rolling back failed: "env PATH=$PATH:/usr/lib/ruby/gems/1.8/bin/ sh -c 'cd -- /home/soprojetos/cap/releases/20130208183759 && bundle exec rake RAILS_ENV=production RAILS_GROUPS=assets assets:precompile && cp -- /home/soprojetos/cap/shared/assets/manifest.yml /home/soprojetos/cap/releases/20130208183759/assets_manifest.yml'" on direct.soprojetos.com.br `

anyone can save me?

Upvotes: 0

Views: 3034

Answers (2)

user3473482
user3473482

Reputation: 11

I'm guessing there was an OS upgrade and at some point something mysql related was either removed or not upgraded.

This worked for me on Ubuntu 16.04.4:

gem uninstall mysql2
sudo apt-get install libmysqlclient-dev
gem install mysql2

You may need to restart apache or whatever service is giving you the error.

Note that if you do

gem uninstall mysql2
gem install mysql2

your system should tell you what you need to install to get the mysql2 gem to install, which in my case was the apt-get command above.

Upvotes: 1

Paul Groves
Paul Groves

Reputation: 4051

Try swapping for the mysql2 gem https://rubygems.org/gems/mysql2

Upvotes: -1

Related Questions