phpmyadmin :取决于: php-phpmyadmin-sql-parser (< 5~~) 但要安装 5.4.0-1

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 不可用,无法安装

--

答案1

您遇到了问题,因为您配置了不稳定的存储库,并且phpmyadmin当前无法安装在那里。phpmyadmin在 Debian 10 中不可用,但它可以从向后移植中使用和安装,而无需冒将系统(部分)升级到不稳定的风险。

要修复您的设置:

  1. 从您的存储库列表中删除不稳定的

  2. 添加向后移植:

    echo deb http://deb.debian.org/debian buster-backports main | sudo tee /etc/apt/sources.list.d/buster-backports.list
    sudo apt update
    
  3. 安装向后移植的phpmyadmin

    sudo apt install -t buster-backports phpmyadmin
    

您可能会遇到由最终从不稳定版本安装的软件包引起的问题;您需要手动降级它们,方法是运行apt install与上面相同的命令,替换phpmyadmin为需要降级的软件包(或将它们添加到phpmyadmin apt install命令中)。

相关内容