Php cannot open shared object file no such file or directory in unknown

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

«Unable to load dynamic library. » for all enabled PDO extensions #2844

«Unable to load dynamic library. » for all enabled PDO extensions #2844

Comments

Description:

I have a project for laravel. And I launch this project through the laradock. I run workspace , php-fpm and mysql containers. In the workspace in the php.ini file, I uncommented ;extensions=pdo_mysql , then I start the database migration and get an error

PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20180731/pdo_mysql (/usr/lib/php/20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0 Illuminate\Database\QueryException SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from information_schema.tables where table_schema = toph and table_name = migrations and table_type = 'BASE TABLE') at vendor/laravel/framework/src/Illuminate/Database/Connection.php:678 674▕ // If an exception occurs when attempting to run a query, we'll format the error 675▕ // message to include the bindings with SQL, which will make this exception a 676▕ // lot more helpful to the developer instead of just the database's errors. 677▕ catch (Exception $e) < ➜ 678▕ throw new QueryException( 679▕ $query, $this->prepareBindings($bindings), $e 680▕ ); 681▕ > 682▕ +33 vendor frames 34 artisan:37 Illuminate\Foundation\Console\Kernel::handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) Whoops\Exception\ErrorException PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20180731/pdo_mysql (/usr/lib/php/20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) at Unknown:0 1▕ +1 vendor frames 2 [internal]:0 Whoops\Run::handleShutdown() 

and the command php -m output the following

root@e581f40484a7:/var/www# php -m PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20180731/pdo_mysql (/usr/lib/php/20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_pgsql' (tried: /usr/lib/php/20180731/pdo_pgsql (/usr/lib/php/20180731/pdo_pgsql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_pgsql.so (/usr/lib/php/20180731/pdo_pgsql.so: undefined symbol: pdo_parse_params)) in Unknown on line 0 PHP Warning: Module 'curl' already loaded in Unknown on line 0 [PHP Modules] ast bcmath calendar Core ctype curl date dom exif fileinfo filter ftp gd gettext hash iconv igbinary intl json libxml mbstring memcached msgpack mysqli mysqlnd openssl pcntl pcre PDO pdo_mysql pdo_pgsql pdo_sqlite pgsql Phar posix readline Reflection session shmop SimpleXML sockets sodium SPL sqlite3 standard sysvmsg sysvsem sysvshm tokenizer wddx xml xmlreader xmlwriter xsl Zend OPcache zip zlib [Zend Modules] Zend OPcache 

Expected Behavior:

Output of docker version

Client: Docker Engine - Community Cloud integration: 1.0.7 Version: 20.10.2 API version: 1.41 Go version: go1.13.15 Git commit: 2291f61 Built: Mon Dec 28 16:17:34 2020 OS/Arch: linux/amd64 Context: default Experimental: true Server: Docker Engine - Community Engine: Version: 20.10.2 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: 8891c58 Built: Mon Dec 28 16:15:28 2020 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.3 GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b runc: Version: 1.0.0-rc92 GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff docker-init: Version: 0.19.0 GitCommit: de40ad0 

Output of php -i | grep -i ^pdo

root@97919140e223:/var/www# php -i | grep -i ^pdo PHP Warning: PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib/php/20180731/pdo_mysql (/usr/lib/php/20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib/php/20180731/pdo_mysql.so (/usr/lib/php/20180731/pdo_mysql.so: undefined symbol: mysqlnd_allocator)) in Unknown on line 0 PDO PDO support => enabled PDO drivers => mysql, pgsql, sqlite pdo_mysql PDO Driver for MySQL => enabled pdo_mysql.default_socket => /var/run/mysqld/mysqld.sock => /var/run/mysqld/mysqld.sock pdo_pgsql PDO Driver for PostgreSQL => enabled pdo_sqlite PDO Driver for SQLite 3.x => enabled 

Output of docker-compose version

docker-compose version 1.27.4, build 40524192 docker-py version: 4.3.1 CPython version: 3.7.7 OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019 

System info: Mac, Windows or Linux. Include which disto/version

OS: Ubuntu 20.04.2 LTS on Windows 10 x86_64 Kernel: 5.4.72-microsoft-standard-WSL2 Uptime: 3 hours, 37 mins Packages: 645 (dpkg) Shell: bash 5.0.17 Terminal: /dev/pts/1 CPU: Intel i5-9300H (8) @ 2.399GHz Memory: 1461MiB / 6226MiB 

Steps to reproduce the issue:

  1. clone laradock repository
  2. up php-fpm workspace containers
  3. uncomment ;extensions=pdo_mysql or any other pdo extension
  4. run artisan migrate

The text was updated successfully, but these errors were encountered:

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Warning: PHP Startup: Unable to load dynamic library ‘mysqli’ #8516

PHP Warning: PHP Startup: Unable to load dynamic library ‘mysqli’ #8516

Comments

Description

I have enabled mysqli extension for php 8.1 on ubuntu 20.04.

After enabling extension I’m getting the following error:

PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20210902/mysqli (/usr/lib/php/20210902/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/mysqli.so (/usr/lib/php/20210902/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0

I have installed the current packages.

When I do php —ini . I get the following output.

PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20210902/mysqli (/usr/lib/php/20210902/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/20210902/mysqli.so (/usr/lib/php/20210902/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0 Configuration File (php.ini) Path: /etc/php/8.1/cli Loaded Configuration File: /etc/php/8.1/cli/php.ini Scan for additional .ini files in: /etc/php/8.1/cli/conf.d Additional .ini files parsed: /etc/php/8.1/cli/conf.d/10-mysqlnd.ini, /etc/php/8.1/cli/conf.d/10-opcache.ini, /etc/php/8.1/cli/conf.d/10-pdo.ini, /etc/php/8.1/cli/conf.d/20-calendar.ini, /etc/php/8.1/cli/conf.d/20-ctype.ini, /etc/php/8.1/cli/conf.d/20-exif.ini, /etc/php/8.1/cli/conf.d/20-ffi.ini, /etc/php/8.1/cli/conf.d/20-fileinfo.ini, /etc/php/8.1/cli/conf.d/20-ftp.ini, /etc/php/8.1/cli/conf.d/20-gettext.ini, /etc/php/8.1/cli/conf.d/20-iconv.ini, /etc/php/8.1/cli/conf.d/20-mysqli.ini, /etc/php/8.1/cli/conf.d/20-pdo_mysql.ini, /etc/php/8.1/cli/conf.d/20-phar.ini, /etc/php/8.1/cli/conf.d/20-posix.ini, /etc/php/8.1/cli/conf.d/20-readline.ini, /etc/php/8.1/cli/conf.d/20-shmop.ini, /etc/php/8.1/cli/conf.d/20-sockets.ini, /etc/php/8.1/cli/conf.d/20-sysvmsg.ini, /etc/php/8.1/cli/conf.d/20-sysvsem.ini, /etc/php/8.1/cli/conf.d/20-sysvshm.ini, /etc/php/8.1/cli/conf.d/20-tokenizer.ini

I’m note sure mysqlnd extension. I have not added it or enabled it in any of the php.ini file.

NOTE: I’m facing exact similar issue in the macos as well. Not sure which package or configuration I’m missing and because of that I’m getting this error.

Источник

Читайте также:  Python передать файл post
Оцените статью