在Ubuntu 16.04上安装mysql-server-5.6的问题

问题描述 投票:-1回答:1

[当我尝试安装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

我使用这2种方法添加了存储库:

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

sudo add-apt-repository -y ppa:ondrej/mysql-5.6
sudo apt-get update

注意,我也安装了PHP 5.6,没有任何问题。

由于我的所有项目都依赖于MCRYPT,因此我必须安装此版本才能正常运行。

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

需要您的帮助,在此先谢谢您。

php mysql ubuntu mysqli lamp
1个回答
0
投票

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

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

sudo apt-get autoremove

然后尝试再次安装它

© www.soinside.com 2019 - 2024. All rights reserved.