Pivotal Knowledge Base

Follow

Application fails: `LoadError: libmysqlclient.so.18: cannot open shared object file: No such file or directory`

Symptoms

When starting your application, you see the following error message:

ERR LoadError: libmysqlclient.so.18: cannot open shared object file: No such file or directory - /home/vcap/app/vendor/bundle/ruby/2.3.0/gems/mysql-2.9.1/lib/mysql/mysql_api.so`

Cause

This issue is caused by a recent change to the root filesystem used on PWS.  The libmysql library was removed and replaced with the libmariadb library.  If you're seeing this then your application is compiling against libmysql.  

Resolution

To fix, simply restage your application.  When you restage your application, it will recompile against libmariadb which is compatible replacement library to libmysql.

Please note that `cf restage` will result in a small amount of downtime.  To avoid this, we recommend using blue / green deployments.

Comments

Powered by Zendesk