Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/286.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在Ubuntu 16.04上安装mysql-server-5.6时出现问题_Php_Mysql_Ubuntu_Mysqli_Lamp - Fatal编程技术网

Php 在Ubuntu 16.04上安装mysql-server-5.6时出现问题

Php 在Ubuntu 16.04上安装mysql-server-5.6时出现问题,php,mysql,ubuntu,mysqli,lamp,Php,Mysql,Ubuntu,Mysqli,Lamp,当我尝试安装mysql-server-5.6:sudo apt get install mysql-server-5.6时,收到此错误消息: Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: mailx tinyca The following NEW packages will be installed: mysql-s

当我尝试安装mysql-server-5.6:sudo apt get install mysql-server-5.6时,收到此错误消息:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  mysql-server-5.6
0 upgraded, 1 newly installed, 0 to remove and 25 not upgraded.
Need to get 0 B/6,004 kB of archives.
After this operation, 52.7 MB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 75769 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.6_5.6.35-1+deb.sury.org~xenial+0.1_amd64.deb ...
Aborting downgrade from (at least) 5.7 to 5.6.
If are sure you want to downgrade to 5.6, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.6_5.6.35-1+deb.sury.org~xenial+0.1_amd64.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/mysql-server-5.6_5.6.35-1+deb.sury.org~xenial+0.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
mysql-client-5.6
安装正常

首先,我卸载了mysql-server-5.7:

sudo apt-get remove dbconfig-mysql
sudo apt-get remove --purge mysql*
sudo apt-get purge mysql*
sudo apt-get autoremove
sudo apt-get autoclean
我使用以下两种方法添加了回购:

sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu trusty universe'
sudo apt-get update

注意,我还安装了
PHP5.6
,没有任何问题

由于我的所有项目都依赖于
MCRYPT
,因此我必须安装此版本才能使其正常工作

我使用了mysql-server-5.7,但它不兼容。。。数据不会插入mysql服务器


需要您的帮助,提前谢谢。

我认为问题出在mysql客户端上,因为您已经有了它,它正在尝试安装它,这导致了错误

运行此命令以清理未使用的库:

sudo apt-get autoremove

然后再次尝试安装它

您好,谢谢您的回答,但我已经安装了,您可以查看我的帖子:)它在错误消息中说:
如果您确定要降级到5.6,请删除文件/var/lib/mysql/debian-*.flag,然后再次尝试安装。
--您是否尝试删除该文件?
sudo apt-get autoremove