我一直在互联网上寻找解决方案,但一直没能找到。尝试运行时,我总是收到这些错误sudo apt-get upgrade
。我不太确定应该提供什么信息,请随时询问。
以下是我跑步时得到的结果sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
mysql-server
The following packages will be upgraded:
libmysqlclient-dev libmysqlclient20
2 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 2,031 kB of archives.
After this operation, 165 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 libmysqlclient-dev amd64 5.7.19-1ubuntu16.04 [1,190 kB]
Get:2 http://repo.mysql.com/apt/ubuntu xenial/mysql-5.7 amd64 libmysqlclient20 amd64 5.7.19-1ubuntu16.04 [841 kB]
Fetched 2,031 kB in 0s (9,089 kB/s)
(Reading database ... 165068 files and directories currently installed.)
Preparing to unpack .../libmysqlclient-dev_5.7.19-1ubuntu16.04_amd64.deb ...
Unpacking libmysqlclient-dev (5.7.19-1ubuntu16.04) over (5.7.19-0ubuntu0.16.04.1) ...
Preparing to unpack .../libmysqlclient20_5.7.19-1ubuntu16.04_amd64.deb ...
Unpacking libmysqlclient20:amd64 (5.7.19-1ubuntu16.04) over (5.7.19-0ubuntu0.16.04.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up mysql-server-5.7 (5.7.19-0ubuntu0.16.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
Setting up libmysqlclient20:amd64 (5.7.19-1ubuntu16.04) ...
No apport report written because the error message indicates its a followup error from a previous failure.
Setting up libmysqlclient-dev (5.7.19-1ubuntu16.04) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
mysql-server-5.7
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
尝试删除并重新安装 MySQL 后,这个答案最终修复了它:https://askubuntu.com/a/763623/485614