我试图将 PHP 降级回 5.4(升级后我的网站变得非常慢)。我按照本指南中的第一步进行操作:如何在 Ubuntu 14.04(使用 LAMP 安装)中将 PHP 从 5.5.9 降级到 5.4
现在我无法再安装 PHP5
Get:1 http://de.archive.ubuntu.com/ubuntu/ trusty-updates/main php5 all 5.5.9+dfsg-1ubuntu4.25 [1,308 B]
Fetched 1,308 B in 0s (31.9 kB/s)
(Reading database ... 63966 files and directories currently installed.)
Removing phpmyadmin (4:4.0.10-1) ...
dpkg: error processing package phpmyadmin (--remove):
subprocess installed post-removal script returned error exit status 10
Errors were encountered while processing:
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)
我该如何解决这个问题?
我尝试完成安装,apt-get -f install
但得到以下结果:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
phpmyadmin
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 23.0 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 63213 files and directories currently installed.)
Removing phpmyadmin (4:4.0.10-1) ...
dpkg: error processing package phpmyadmin (--remove):
subprocess installed post-removal script returned error exit status 10
Errors were encountered while processing:
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)
Ubuntu 16.04.3
尝试重启,情况依然相同
答案1
Apt 数据库已锁定。其他人正在尝试安装其他东西。可能是您在另一个终端中,或者您正在运行 Synaptic 包管理器。尝试通过 grep 您的进程来找到它:
ps -ef | grep apt
或者
ps -ef | grep synaptic
只需尝试退出或使用 kill -15 终止该应用程序,然后尝试再次安装。