libdb2.so.1: cannot open shared object file: No such file or directory

Got this error while deploying a Rails app on Nginx:

libdb2.so.1: cannot open shared object file: No such file or directory - ... ibm_db.so

This means that the ibm_db adapter is installed, but it can’t find the DB2 libraries. The issue is that IBM_DB_HOME and some other environment variables are not set.

The best solution is to make sure all users have db2profile loaded. Edit /etc/profile and add:

. /opt/dsdriver/db2profile

You should now reload your profile (. /etc/profile) and restart Nginx.

This assumes that you already have IBM Data Server Driver installed under /opt/dsdriver.

你可能感兴趣的:(libdb2.so.1: cannot open shared object file: No such file or directory)