PHP5卸載後如何安裝!

PHP5卸載後如何安裝!

我試圖將 PHP 降級回 5.4(升級後我的網站變得非常慢)。我按照本指南的第一步進行操作:如何在 Ubuntu 14.04 中將 PHP 從 5.5.9 降級到 5.4(使用 LAMP 安裝)

現在我無法再安裝 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)

烏班圖16.04.3

試著重啟,情況還是一樣

答案1

Apt 資料庫已鎖定。其他人只是想安裝其他東西。也許您在另一個終端機中,或者您正在運行 Synaptic 套件管理器。嘗試透過 grep 您的進程來找到它:

ps -ef | grep apt

或者

ps -ef | grep synaptic

只需嘗試退出或使用kill -15 終止此應用程序,然後嘗試再次安裝。

相關內容