我正试图在我的计算机上安装php5-cli软件包,但是对于未满足的依赖项,我得到了以下错误。
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libmaven2-core-java : Depends: libdoxia-core-java (>= 1.1) but it is not going to be installed
php5-cli : Depends: libonig2 (>= 5.9.5) but it is not going to be installed
Depends: libqdbm14 (>= 1.8.74) but it is not going to be installed
Depends: php5-common (= 5.6.12+dfsg-1+deb.sury.org~vivid+1) but it is not going to be installed
Depends: php5-json but it is not going to be installed
Recommends: php5-readline but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).我已经尝试过apt-get安装-f,apt-获取清洁和apt-获取自动清洁没有任何帮助。我已经尝试过在这篇文章中给出的几乎所有的如何在添加PPA之后解决未满足的依赖关系?解决方案,但它们似乎都不适合我。
编辑:我试着用
sudo apt-get install php5-readline php5-json php5-common libqdbm14 libonigia-core-java libmaven2-core-java 2 libdox但这似乎也行不通。
Reading package lists... Done
Building dependency tree
Reading state information... Done
libonig2 is already the newest version.
libmaven2-core-java is already the newest version.
libmaven2-core-java set to manually installed.
libqdbm14 is already the newest version.
php5-common is already the newest version.
php5-json is already the newest version.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
php5-readline : Depends: php5-cli (= 5.6.12+dfsg-1+deb.sury.org~vivid+1) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).以下是apt-缓存策略php5-readline的输出:
php5-readline:
Installed: (none)
Candidate: 5.6.12+dfsg-1+deb.sury.org~vivid+1
Version table:
5.6.12+dfsg-1+deb.sury.org~vivid+1 0
500 http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ vivid/main amd64 Packages
5.6.12+dfsg-1 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
5.6.4+dfsg-4ubuntu6.2 0
500 http://pk.archive.ubuntu.com/ubuntu/ vivid-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ vivid-security/main amd64 Packages
5.6.4+dfsg-4ubuntu6 0
500 http://pk.archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages到grep -r 'ftp.us.debian.org' /etc/apt/ and apt-cache policy libmaven2-core-java的输出是
/etc/apt/sources.list:deb http://ftp.us.debian.org/debian unstable main contrib non-free
/etc/apt/sources.list.save:deb http://ftp.us.debian.org/debian unstable main contrib non-free
/etc/apt/sources.list.bak:deb http://ftp.us.debian.org/debian unstable main contrib non-free
grep: and: No such file or directory
grep: apt-cache: No such file or directory
grep: policy: No such file or directory
grep: libmaven2-core-java: No such file or directory这是脚本的输出:
alsa-base http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
cgroupfs-mount http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
curl http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
dmsetup http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
dnsmasq-base http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libarchive13 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libcurl3-gnutls http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libdevmapper1.02.1 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libeclipse-aether-java http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libgnutls-deb0-28 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libgnutls-deb0-28 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libgnutls-openssl27 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libgrpc-dev http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libgrpc0 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libhogweed4 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libhogweed4 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libjsch-java http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libnettle6 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libnettle6 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
librtmp1 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
librtmp1 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libsisu-inject-java http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libssh2-1 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libssl-dev http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libssl1.0.0 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libssl1.0.0 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libtasn1-6 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libtasn1-6 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libunwind8 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libwagon-java http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
libwagon2-java http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
pepperflashplugin-nonfree http://ftp.us.debian.org/debian/ unstable/contrib amd64 Packagesapt-cache policy libmaven2-core-java输出
libmaven2-core-java:
Installed: 2.2.1-22
Candidate: 2.2.1-22
Version table:
*** 2.2.1-22 0
500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages
100 /var/lib/dpkg/status
2.2.1-17 0
500 http://archive.ubuntu.com/ubuntu/ vivid/universe amd64 Packages我遵循了答案中的步骤,删除了存储库,运行了apt-get -f安装,并不得不执行自动删除操作来删除一些不再需要的包。它似乎已经用libmaven2-core-java解决了这个问题。然后,我再次尝试安装php5-cli,但得到了以下输出。
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:
php5-cli : Depends: php5-common (= 5.6.4+dfsg-4ubuntu6.2) but 5.6.12+dfsg-1+deb.sury.org~vivid+1 is to be installed
Recommends: php5-readline but it is not going to be installed
E: Unable to correct problems, you have held broken packages.输出到sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 53 not upgraded并输出到sudo apt-get install php5-cli。
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:
php5-cli : Depends: php5-common (= 5.6.4+dfsg-4ubuntu6.2) but 5.6.12+dfsg-1+deb.sury.org~vivid+1 is to be installed
Recommends: php5-readline but it is not going to be installed
E: Unable to correct problems, you have held broken packages.apt-缓存策略php5 5-公共的输出。
php5-common:
Installed: 5.6.12+dfsg-1+deb.sury.org~vivid+1
Candidate: 5.6.12+dfsg-1+deb.sury.org~vivid+1
Version table:
*** 5.6.12+dfsg-1+deb.sury.org~vivid+1 0
100 /var/lib/dpkg/status
5.6.4+dfsg-4ubuntu6.2 0
500 http://archive.ubuntu.com/ubuntu/ vivid-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ vivid-security/main amd64 Packages
5.6.4+dfsg-4ubuntu6 0
500 http://archive.ubuntu.com/ubuntu/ vivid/main amd64 Packages对dpkg的输出-l \ grep 'sury‘是
ii php5-json 1.3.7-1+deb.sury.org~vivid+1 amd64 JSON module for php5发布于 2015-09-08 05:11:54
启用了不兼容的软件存储库。我们可以修复这个…
ppa-purge sudo apt-获取安装ppa-清除如果一个安装是不可能的,并且没有安装ppa-purge,下载deb软件包cd .wget http://mirrors.kernel.org/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr57_all.deb解压缩并复制可执行的dpkg -x ppa--x_0.2.8+usr 57_all.deb ppa-清除sudo cp ppa-清除/usr/sbin /ppa--x/usr/sbinhttp://ftp.us.debian.org/。这个存储库提供了依赖于libmaven2-core-java的libdoxia-core-java。但这个包裹没有了。因此,在您的http://ftp.us.debian.org/中删除存储库/etc/apt/sources.list。之后,运行sudo apt-get更新并降级包,包括: sudo apt-get install libmaven2 2-core-java=2.2.1-17。ppa:ondrej/php5-5.6清除PPA ppa-purge之后没有必要,但在您的情况下,dpkg -l | grep 'sury' sudo apt-get install 5- purging =5.6.4+dfsg-4 ubuntu6.2 sudo sudo-get install php5-json=1.3.2-2 build1列出的包也降级了。https://askubuntu.com/questions/671067
复制相似问题