如何在 debian 9.3 中安装 php7.0-mbstring

如何在 debian 9.3 中安装 php7.0-mbstring

我无法安装 php7.0-mbstring:

以下软件包具有未满足的依赖关系: php7.0-mbstring :依赖:php7.0-common (= 7.0.19-1) 但要安装 7.0.20-1~dotdeb+8.2 E: 无法纠正问题,您持有破损的包裹。

来源.列表:

deb http://debian.man.ac.uk/debian/ stretch main deb-src http://debian.man.ac.uk/debian/ stretch main

deb http://security.debian.org/ stretch/updates main contrib deb-src http://security.debian.org/ stretch/updates main contrib

deb http://ftp.at.debian.org/debian/ stretch-updates main contrib non-free deb-src http://ftp.at.debian.org/debian/ stretch-updates main contrib non-free

deb http://download.webmin.com/download/repository sarge contrib

apt-cache policy输出:

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://download.webmin.com/download/repository sarge/contrib amd64 Packages
     release v=3.1,o=Jamie Cameron,a=stable,n=sarge,l=Webmin,c=contrib,b=amd64
     origin download.webmin.com
 500 http://ftp.at.debian.org/debian stretch-updates/main amd64 Packages
     release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
     origin ftp.at.debian.org
 500 http://security.debian.org stretch/updates/contrib amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=contrib,b=amd64
     origin security.debian.org
 500 http://security.debian.org stretch/updates/main amd64 Packages
     release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://debian.man.ac.uk/debian stretch/main amd64 Packages
     release v=9.3,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
     origin debian.man.ac.uk

apt-cache policy php7.0-common输出:

  Installed: 7.0.20-1~dotdeb+8.2
  Candidate: 7.0.20-1~dotdeb+8.2
  Version table:
  *** 7.0.20-1~dotdeb+8.2 100
        100 /var/lib/dpkg/status
      7.0.19-1 500
        500 http://debian.man.ac.uk/debian stretch/main amd64 Packages

答案1

您有一个来自 dotdeb 的版本php7.0-common,您的存储库列表不再了解该版本,并且它阻止您安装 Debian 9 PHP 软件包。您应该删除它以及依赖它的任何软件包,并php7.0-common从 Debian 存储库安装:

sudo apt remove php7.0-common
sudo apt install php7.0-mbstring

相关内容