PHP Startup: Unable to load dynamic library '/usr/lib/php/20160303/pdo_sqlite.so' with Jenkins

我怕爱的太早我们不能终老 提交于 2019-12-21 06:15:33

问题


I'm getting this warning when running the phpunit test suite in Jenkins pipeline.

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

However this warning is not thrown when running the test suite directly in terminal.

I have PHP 7.1 in my system and this is the only PHP version I have installed. php7.1-sqlite3 is installed.

Thank you in advance.


回答1:


As far as I have found out, there is a faulty file in /usr/local/lib called libsqlite3.so.0 which points to libsqlite3.so.0.8.6. I renamed the file in case it was needed for something. With the command:

cd /usr/local/lib sudo mv libsqlite3.so.0 ./libsqlite3.so.0.back

But you can also delete it: rm libsqlite3.so.0

The thread that lead me to the answer: link

This solved my problems, and I hope they solve yours as well :)




回答2:


I had this same issue with PHP 7.1 on Ubuntu 16.04.

Running the following fixed the issue for me:

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-sqlite3


来源:https://stackoverflow.com/questions/48732240/php-startup-unable-to-load-dynamic-library-usr-lib-php-20160303-pdo-sqlite-so

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!