Apt
phpmyadmin : 取決於: php-phpmyadmin-sql-parser (< 5~~) 但要安裝 5.4.0-1
在我的 debian 升級後,從 10.5 到 10.6 我有這個小問題
我無法升級此軟體包
The following packages have been kept back: php-phpmyadmin-sql-parser
我想安裝,但 debian 要求我刪除 phpmyadmin。我認為這不是一個好主意
The following packages will be REMOVED: phpmyadmin The following packages will be upgraded: php-phpmyadmin-sql-parser
然後我想同時安裝 phpmyadmin 和 php-phpmyadmin-sql-parser 但我還有另一個檔位
apt install phpmyadmin php-phpmyadmin-sql-parser Reading package lists... Done Building dependency tree Reading state information... Done phpmyadmin is already the newest version (4:4.9.5+dfsg1-2). Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: phpmyadmin : Depends: php-phpmyadmin-sql-parser (< 5~~) but 5.4.0-1 is to be installed E: Unable to correct problems, you have held broken packages.
我試過了
dpkg --get-selections | grep hold
但它沒有給我任何結果。零輸出
所以我嘗試使用 aptitude,但 aptitude 要求我刪除 phpmyadmin
# aptitude install php-phpmyadmin-sql-parser The following packages will be upgraded: php-phpmyadmin-sql-parser 1 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 78.4 kB of archives. After unpacking 12.3 kB will be used. The following packages have unmet dependencies: phpmyadmin : Depends: php-phpmyadmin-sql-parser (< 5~~) but 5.4.0-1 is to be installed The following actions will resolve these dependencies: Remove the following packages: 1) phpmyadmin [4:4.9.5+dfsg1-2 (now, unstable)] Accept this solution? [Y/n/q/?]
所以我刪除了 phpmyadmin 和 php-phpmyadmin-sql-parser 然後我嘗試只重新安裝 phpmyadmin
# apt install phpmyadmin Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: phpmyadmin : Depends: php-phpmyadmin-sql-parser (< 5~~) but 5.4.0-1 is to be installed Recommends: php-bz2 Recommends: php-tcpdf but it is not going to be installed
所以我最終根本無法安裝 phpmyadmin
我的來源.list
deb http://mirrors.linode.com/debian buster main deb-src http://mirrors.linode.com/debian buster main deb http://mirrors.linode.com/debian-security buster/updates main deb-src http://mirrors.linode.com/debian-security buster/updates main deb http://mirrors.linode.com/debian buster-updates main deb-src http://mirrors.linode.com/debian buster-updates main
這是 sources.list.d 中所有其他 .list 文件的內容
deb http://ftp.debian.org/debian unstable main contrib deb https://packages.sury.org/php/ buster main deb https://dl.yarnpkg.com/debian/ stable main
我該怎麼做才能解除這種情況?
建議的解決方案和esits
我無法刪除
deb http://ftp.debian.org/debian unstable main contrib
因為刪除它會使 phpmyadmin 不可用,沒有安裝的候選人
–
您遇到了問題,因為您配置了不穩定的儲存庫,並且
phpmyadmin
目前無法在那里安裝。phpmyadmin
在 Debian 10 中不可用,但它可以從 backports 獲得和安裝,而不會冒將系統(部分)升級到不穩定的風險。要修復您的設置:
- 從儲存庫列表中刪除不穩定
- 添加反向埠:
echo deb http://deb.debian.org/debian buster-backports main | sudo tee /etc/apt/sources.list.d/buster-backports.list sudo apt update
- 安裝向後移植的
phpmyadmin
:sudo apt install -t buster-backports phpmyadmin
您可能會遇到由您最終從不穩定安裝的軟體包引起的問題;您需要手動降級它們,方法是執行與
apt install
上述相同的命令,替換phpmyadmin
為您需要降級的包(或將它們添加到phpmyadmin
apt install
命令中)。