Php

同時執行 phpMyAdmin 和 php-7?

  • January 20, 2016

將php5升級到php7後,當我想升級時出現此錯誤apt-get install phpmyadmin

The following packages have unmet dependencies:
phpmyadmin : Depends: libapache2-mod-php5 but it is not going to be installed or
                      libapache2-mod-php5filter but it is not going to be installed or
                      php5-cgi but it is not going to be installed or
                      php5-fpm but it is not going to be installed or
                      php5 but it is not going to be installed
             Depends: php5-mysql but it is not going to be installed or
                      php5-mysqli but it is not installable or
                      php5-mysqlnd but it is not going to be installed
             Depends: php5-mcrypt but it is not going to be installed
             Depends: php5-json but it is not going to be installed
             Depends: php-gettext but it is not going to be installed
             Recommends: php5-gd but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

提示phpMyAdmin需要php5,但是由於已經安裝了php7,所以無法安裝依賴。

有沒有辦法同時安裝 phpMyAdmin 和 php7?

我正在使用這些額外的資源

deb http://packages.dotdeb.org jessie all

deb-src http://packages.dotdeb.org jessie all

使用 Debian 傑西。

在發行版(或第三方儲存庫)更新以處理此問題之前,使用 php7 和任何 OS 軟體包將很困難,並且您真的不應該在生產系統上執行此操作。

我的建議是不要嘗試這樣做,而是等到 PHP7 基礎設施到位。您可以通過手動安裝 PHPMyAdmin 等大多數東西來解決問題,但這不是好的系統管理實踐。

通過在我的 Web 根文件夾 (/var/www/html) 中執行此命令,我可以讓它在我的 VPN 上執行。

git clone --depth=1 --branch=STABLE https://github.com/phpmyadmin/phpmyadmin.git

這可能不是最佳實踐,但會起作用。

引用自:https://serverfault.com/questions/740782