我试图在我的ubuntu16.04上为django项目安装mysql。安装有一些现有文件的问题,得到错误:
mysql-server is already the newest version (5.7.19-0ubuntu0.16.04.1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
mysql-server : Depends: mysql-server-5.7 but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)
我试过,sudo apt-get -f install会出错:
Preparing to unpack .../mysql-server-5.7_5.7.19-0ubuntu0.16.04.1_amd64.deb ...
grep: /etc/mysql/: No such file or directory
Aborting downgrade from (at least) 10.2 to 5.7.
If are sure you want to downgrade to 5.7, remove the file
/var/lib/mysql/debian-*.flag and try installing again.
dpkg: error processing archive /var/cache/apt/archives/mysql-server-5.7_5.7.19-0ubuntu0.16.04.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.7_5.7.19-0ubuntu0.16.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我也尝试过安装步骤,但收到第一个错误。
答案 0 :(得分:0)
与另一个包有类似的问题并解决了我的问题。
sudo dpkg -i --force-overwrite /var/cache/apt/archives/libmysqlclient20_5.7.20-1ubuntu16.04_amd64.deb