debian 9,apt-get install php7.3,你有损坏的软件包吗?

debian 9,apt-get install php7.3,你有损坏的软件包吗?

我正在尝试在 Debian 9 上安装 php7.3 和 nginx。

“您持有破损的包裹”是什么意思以及如何修复?

这是我看到的(之后sudo su -

root@vps149861:/etc/apt# apt-get update
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://deb.debian.org/debian stretch-updates InRelease  
Hit:3 http://deb.debian.org/debian stretch Release                       
Hit:4 http://security.debian.org stretch/updates InRelease               
Hit:5 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:7 https://packages.sury.org/php stretch InRelease
Reading package lists... Done

root@vps149861:/etc/apt# apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@vps149861:/etc/apt# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

root@vps149861:/etc/apt# apt-get install php7.3
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:
 php7.3 : Depends: libapache2-mod-php7.3 but it is not going to be installed or
                   php7.3-fpm but it is not going to be installed or
                   php7.3-cgi but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我也从未使用过apt-mark或者在这种情况下它是否有用,但这说:

E: No packages found
root@vps149861:/etc/apt# apt-mark showhold
root@vps149861:/etc/apt# 

另外,根据要求:

root@vps149861:/etc/apt# dpkg -l | grep ^h
root@vps149861:/etc/apt# 

而且这个-f选项对我也没有帮助......

root@vps149861:/etc/apt# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

答案1

这就是我所做的,并且对我来说非常有效。

sudo apt-get install aptitude

sudo aptitude install php7.3

相关内容