Shared object “libsqlite3.so.8” not found

I noticed some weird thing on my server today. When I ran some PHP code, I got the following error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212-zts/pdo_sqlite.so' - Shared object "libsqliteo_sqlite.so" in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212-zts/pdo_sqlite.so' - Shared object "libsqlite3.so.ite.so" in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212-zts/sqlite3.so' - Shared object "libsqlite3.se3.so" in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/20121212-zts/sqlite3.so' - Shared object "libsqlite3.so.8" " in Unknown on line 0
PHP 5.5.13 (cli) (built: Jun  3 2014 10:01:52)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

Obviously, PHP SQLite extensions expect the library: libsqlite3.so.8, and it was missing or deleted after the upgrade. To solve this problem, we need to know where is the file.

sudo find / -name "libsqlite3.so*"

In my system, the file is here:

/usr/local/lib/libsqlite3.so.0
/usr/local/lib/libsqlite3.so.0.8.6

So I simply created the missing file by soft-linking it:

cd /usr/local/lib/
sudo ln -s libsqlite3.so libsqlite3.so.8

And the error is gone.

#php -v
PHP 5.5.13 (cli) (built: Jun  3 2014 10:01:52)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
    with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2014, by Zend Technologies

–Derrick

Our sponsors:

Leave a Reply

Your email address will not be published.