每当我安装 phpMyAdmin 时,都会出现以下错误:-
After this operation, 0 B of additional disk space will be used.
Setting up phpmyadmin (4:4.5.4.1-2ubuntu2) ...
/var/lib/dpkg/info/phpmyadmin.postinst: 51: .: Can't open /usr/share/dbconfig-common/dpkg/postinst.mysql
dpkg: error processing package phpmyadmin (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
phpmyadmin
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
E: Sub-process /usr/bin/dpkg returned an error code (1)
现在请告诉我我该做什么?
答案1
这个答案是解决问题的一种方法,但问题的根源是您dpkg
手动删除了 文件。
sudo apt-get purge phpmyadmin
sudo touch /usr/share/dbconfig-common/dpkg/postinst.mysql
(对每个丢失的文件都执行此操作)
然后sudo apt-get autoremove
sudo apt-get install phpmyadmin