当我安装某些内容或更新某些内容时,我收到以下错误消息:
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
libapache2-mod-php7.0 : Depends: apache2-api-20120211
Depends: apache2-bin (>= 2.4.16) but it is not installed
E: Unmet dependencies. Try using -f.
但是当我输入apt-get -f install
:
(Reading database ... 32387 files and directories currently installed.)
Preparing to unpack .../apache2-bin_2.4.20-2_amd64.deb ...
Unpacking apache2-bin (2.4.20-2) ...
dpkg: error processing archive /var/cache/apt/archives/apache2-bin_2.4.20-2_amd64.deb (--unpack):
trying to overwrite '/usr/lib/apache2/modules/httpd.exp', which is also in package apache2.2-bin 2.2.22-13+deb7u6
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/apache2-bin_2.4.20-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我能做些什么?
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://froxlormirror.netcup.net/froxlor-nc/ wheezy/main amd64 Packages
release o=netcup Froxlor,a=oldstable,n=wheezy,l=inoffical froxlor packac=main
origin froxlormirror.netcup.net
500 http://froxlormirror.netcup.net/froxlor/ wheezy/main amd64 Packages
release o=froxlor.org,a=oldstable,n=wheezy,l=Froxlor Repository,c=main
origin froxlormirror.netcup.net
500 http://debian.froxlor.org/ wheezy/main amd64 Packages
release o=froxlor.org,a=oldstable,n=wheezy,l=Froxlor Repository,c=main
origin debian.froxlor.org
500 http://ftp.us.debian.org/debian/ testing/non-free Translation-en
500 http://ftp.us.debian.org/debian/ testing/main Translation-en
500 http://ftp.us.debian.org/debian/ testing/contrib Translation-en
500 http://ftp.us.debian.org/debian/ testing/non-free amd64 Packages
release o=Debian,a=testing,n=stretch,l=Debian,c=non-free
origin ftp.us.debian.org
500 http://ftp.us.debian.org/debian/ testing/contrib amd64 Packages
release o=Debian,a=testing,n=stretch,l=Debian,c=contrib
origin ftp.us.debian.org
500 http://ftp.us.debian.org/debian/ testing/main amd64 Packages
release o=Debian,a=testing,n=stretch,l=Debian,c=main
origin ftp.us.debian.org
500 http://ftp.debian.org/debian/ sid/main Translation-en
500 http://ftp.debian.org/debian/ sid/main amd64 Packages
release o=Debian,a=unstable,n=sid,l=Debian,c=main
origin ftp.debian.org
500 http://ftp.de.debian.org/debian/ wheezy-updates/main Translation-en
500 http://ftp.de.debian.org/debian/ wheezy-updates/main amd64 Packages
release o=Debian,a=oldstable-updates,n=wheezy-updates,l=Debian,c=main
origin ftp.de.debian.org
500 http://security.debian.org/ wheezy/updates/main Translation-en
500 http://security.debian.org/ wheezy/updates/main amd64 Packages
release v=7.0,o=Debian,a=oldstable,n=wheezy,l=Debian-Security,c=main
origin security.debian.org
500 http://ftp.de.debian.org/debian/ wheezy/main Translation-en
500 http://ftp.de.debian.org/debian/ wheezy/main amd64 Packages
release v=7.11,o=Debian,a=oldstable,n=wheezy,l=Debian,c=main
origin ftp.de.debian.org
Pinned packages:
答案1
您需要(至少)删除apache2.2-bin
:
apt-get remove apache2.2-bin
或者,您可以强制安装apache2-bin
:
dpkg -i --force-overwrite /var/cache/apt/archives/apache2-bin_2.4.20-2_amd64.deb
然后再试apt-get -f install
一次。