I
I
Igor L2021-10-31 18:52:51
linux
Igor L, 2021-10-31 18:52:51

How to fix php mysql errors?

I have already reinstalled a lot, updated it, but the mysqli module still does not connect, it
php -m
gives an error

Warning: PHP Startup: Unable to load dynamic library 'mysqli.so'

Warning: PHP Startup: Unable to load dynamic library 'mysqli.so' (tried: /usr/lib/php/20200930/mysqli.so (/usr/lib/php/20200930/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib/php/20200930/mysqli.so.so (/usr/lib/php/20200930/mysqli.so.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0
[PHP Modules]
Core
date
filter
hash
json
libxml
openssl
pcntl
pcre
Reflection
session
sodium
SPL
standard
zlib

and the main thing is writing - mysqli.so.so , I definitely didn’t rename it manually, and it’s not there - /usr/lib/php/20200930/ ,

installation errors
spoiler
Подготовка к распаковке …/php7.4-mysql_7.4.25-1+0~20211023.53+debian10~1.gbp6a5285_amd64.deb …
Распаковывается php7.4-mysql (7.4.25-1+0~20211023.53+debian10~1.gbp6a5285) …
Настраивается пакет php7.4-mysql (7.4.25-1+0~20211023.53+debian10~1.gbp6a5285) …
dpkg: ошибка при обработке пакета php7.4-mysql (--configure):
 installed php7.4-mysql package post-installation script subprocess returned error exit status 10
Обрабатываются триггеры для libapache2-mod-php7.4 (7.4.25-1+0~20211023.53+debian10~1.gbp6a5285) …
При обработке следующих пакетов произошли ошибки:
 php7.4-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Karabanov, 2021-10-31
@karabanov

Erase what you installed there and install the version of PHP you are interested in from the Sury repository .
Read the README there.

R
rPman, 2021-10-31
@rPman

you need to look at what is there for the error message, it is quite possible /usr/lib/php/20200930/mysqli.so file of zero length and it will be enough to delete it manually delete
everything that at least somehow conflicts, including their dependencies
apt purge ...
if anything can be removed manually with dpkg ignoring dependencies but eventually the order needs to be restored for apt autoremove -f to work and dpkg-reconfigure -a too
ps why do you have such a strange path?
therefore, instead of debian, I install ubuntu, the list and backports support for a bunch of useful applications are much more complete there and everything is much more convenient

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question