简体   繁体   中英

PHP Startup: Unable to load dynamic library 'pdo-sqlite.so'

I found these issues after updating php5-sqlite (previously it was working fine) :

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/pdo_sqlite.so' - /usr/lib/php5/20131226/pdo_sqlite.so: undefined symbol: sqlite3_column_table_name in Unknown on line 0

PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20131226/sqlite3.so' - /usr/lib/php5/20131226/sqlite3.so: undefined symbol: sqlite3_enable_load_extension in Unknown on line 0

ps : so files exist

Details :

  1. OS : Ubuntu 14.04 LTS
  2. PHP : PHP 5.6.15

I have tried uninstalling (purge) and reinstalling PHP but the issues still remain.

I have tried commenting out extension=pdo-sqlite.so in /etc/php5/cli/conf.d/pdo_sqlite.ini , but it says " Driver not found ".

Please help...

If you have built SQLite from source? Then, you forgot to enable Column metadata. Recompile SQLite with

CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure
make
sudo make install

Have fun using the cutting edge SQLite.

Reference - https://www.sqlite.org/compile.html#enable_column_metadata

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM