我尝试使用以下命令卸载 phpmyadmin:
sudo apt-get purge phpmyadmin
但每次都会出现这个错误:
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)
我也尝试了互联网上的其他解决方案,例如:
sudo apt-get --force-yes remove phpmyadmin
仍然出现同样的错误。
谢谢你的回答
更新:这是完整的输出:
sudo apt-get purge phpmyadmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
dbconfig-common dbconfig-mysql javascript-common libjs-jquery
libjs-sphinxdoc libjs-underscore libmcrypt4 php-gd php-mcrypt php-phpseclib
php-tcpdf php7.0-gd php7.0-mcrypt
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
phpmyadmin*
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 25.0 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 218432 files and directories currently installed.)
Removing phpmyadmin (4:4.5.4.1-2ubuntu2) ...
/var/lib/dpkg/info/phpmyadmin.prerm: 88: /etc/dbconfig-common/phpmyadmin.conf: [Servers][][AllowRoot]: not found
dpkg: error processing package phpmyadmin (--purge):
subprocess installed pre-removal script returned error exit status 127
/var/lib/dpkg/info/phpmyadmin.config: 88: /etc/dbconfig-common/phpmyadmin.conf: [Servers][][AllowRoot]: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)