PHP 7.0 和 MySQL 启动错误“未定义符号:mysqlnd_allocator in Unknown" [英] PHP 7.0 and MySQL start-up error "undefined symbol: mysqlnd_allocator in Unknown"

查看:27
本文介绍了PHP 7.0 和 MySQL 启动错误“未定义符号:mysqlnd_allocator in Unknown"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 PHP7 的自定义编译版本上收到此警告,即使在运行 php -v 时也是如此.

Getting this warning on a custom-compiled version of PHP7, even when running php -v.

尝试了所有发布的解决方案.什么可能导致这种情况?

Tried all solutions posted. What could cause this?

PHP 警告:PHP 启动:无法加载动态库 '/usr/lib/php/20151012/pdo_mysql.so' -/usr/lib/php/20151012/pdo_mysql.so:未定义符号:在线未知中的 mysqlnd_allocator0

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

有与此类似的问题,但它们并不完全相同 - 它们通常与缺少 mcrypt 库有关.我在打印 phpinfo() 时确认实际上已加载 mycrypt,以及 pdo_mysql.

There are similar questions to this, but they are not quite the same problem - they generally relate to a missing mcrypt library. I confirmed that mycrypt is in fact loaded, as well as pdo_mysql when printing out phpinfo().

订单有问题吗?此外,这是针对 PHP 7 的,我认为它具有不同的 ini 文件格式.

Is there something wrong with the order? Also, this is for PHP 7, which I believe has different formats for ini files.

按照此处的说明进行重新编译.在这方面不太有经验:http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu

Following instructions here for recompile. Not too experienced in this: http://www.hashbangcode.com/blog/compiling-and-installing-php7-ubuntu

此外,使用 apt-get purge 完全删除 MySQL.一事无成.

Also, removed MySQL completely with apt-get purge. No luck with anything.

推荐答案

(代表 OP 发布).

按顺序执行的命令;然后我从系统中完全删除了 MySQL 和 PHP:

Commands performed in order; I removed MySQL and PHP completely from system then:

sudo apt-get update
sudo apt-get install php7.0
sudo apt-get install php7.0-mysql

这似乎修复了错误.呜呜.

This seems to have fixed the error. Uuuugh.

这篇关于PHP 7.0 和 MySQL 启动错误“未定义符号:mysqlnd_allocator in Unknown"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆