我正在尝试删除 mysql-workbench。但是每次我尝试删除与 mysql 相关的内容时,都会出现此错误。
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
mysql-server-5.6
0 upgraded, 0 newly installed, 1 to remove and 9 not upgraded.
1 not fully installed or removed.
After this operation, 52,5 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 309141 files and directories currently installed.)
Removing mysql-server-5.6 (5.6.24-0ubuntu2) ...
/var/lib/dpkg/info/mysql-server-5.6.postrm: line 53: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.6 (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
mysql-server-5.6
E: Sub-process /usr/bin/dpkg returned an error code (1)
请帮助!
答案1
这是一个已知的错误:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.6/+bug/1455818
解决方法:
打开安装后脚本/var/lib/dpkg/info/mysql-server-5.6.postinst
并注释掉第 95 行:
### /usr/share/mysql-common/configure-symlinks install mysql "$mysql_cfgdir/mysql.cnf"
重试安装。