依赖:gcc-4.9-base (= 4.9.1-16ubuntu6) 但尚未安装

依赖:gcc-4.9-base (= 4.9.1-16ubuntu6) 但尚未安装

当我尝试在 Ubuntu 14.04 上安装 php5-curl 时遇到了这个问题。我运行:sudo apt-get install php5-curl并得到:

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:
 cpp-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 g++-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 gcc-4.9 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libasan1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libatomic1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libcilkrts5 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libgcc-4.9-dev : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libgcc1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libgomp1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libitm1 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 liblsan0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libquadmath0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libstdc++-4.9-dev : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libstdc++6 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libtsan0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 libubsan0 : Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but it is not going to be installed
 php5-curl : Depends: phpapi-20121212
             Depends: php5-common (= 5.5.9+dfsg-1ubuntu4.14) but 5.6.13+dfsg-1+deb.sury.org~trusty+3 is to be installed
 E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

但是当我运行时,apt-get -f install我收到一条消息,当我继续时很多包裹将被删除......:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  dbconfig-common gyp libauthen-pam-perl libc-ares-dev libc-ares2 libio-pty-perl libjs-node-uuid libopendkim9 librbl1 libunbound2 libvbr2 php-gettext
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  gcc-4.9-base libgcc1
The following packages will be REMOVED:
  apache2 apache2-bin apport apt apt-show-versions apt-transport-https apt-utils apt-xapian-index aptitude build-essential byobu clamav clamav-daemon
  clamav-freshclam clamsmtp command-not-found cpp cpp-4.9 g++ g++-4.8 g++-4.9 gcc gcc-4.8 gcc-4.9 gettext-base groff-base grub-common grub-gfxpayload-lists
  grub-pc grub-pc-bin grub2-common landscape-common language-selector-common libapache2-mod-php5 libapt-inst1.5 libapt-pkg-perl libapt-pkg4.12 libasan1
  libasprintf0c2 libatomic1 libboost-iostreams1.54.0 libboost-iostreams1.55.0 libcilkrts5 libclamav6 libcwidget3 libept1.4.12 libgcc-4.8-dev libgcc-4.9-dev
  libgmp-dev libgmpxx4ldbl libgomp1 libicu52 libitm1 libllvm3.5 liblsan0 liblua5.1-0 libmemcached10 libmemcached11 libopendbx1 libopendbx1-sqlite3
  libquadmath0 libsigc++-2.0-0c2a libstdc++-4.8-dev libstdc++-4.9-dev libstdc++6 libtsan0 libubsan0 libv8-3.14-dev libv8-3.14.5 libxapian22 lshw man-db
  mysql-server mysql-server-5.5 mysql-server-core-5.5 node-abbrev node-ansi node-ansi-color-table node-archy node-async node-block-stream
  node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fstream node-fstream-ignore node-github-url-from-git
  node-glob node-graceful-fs node-gyp node-inherits node-ini node-json-stringify-safe node-lockfile node-lru-cache node-mime node-minimatch node-mkdirp
  node-mute-stream node-node-uuid node-nopt node-normalize-package-data node-npmlog node-once node-osenv node-qs node-read node-read-package-json
  node-request node-retry node-rimraf node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent node-underscore node-which nodejs nodejs-dev
  npm opendkim opendkim-tools php5 php5-intl phpmyadmin pppoeconf python-apt python-xapian python3-apport python3-apt python3-commandnotfound
  python3-distupgrade python3-software-properties python3-update-manager re2c ruby-dev ruby-full ruby2.1-dev sa-compile tasksel tasksel-data telnet
  thermald ubuntu-minimal ubuntu-release-upgrader-core ubuntu-standard unattended-upgrades update-manager-core update-notifier-common webmin
The following NEW packages will be installed:
  gcc-4.9-base
The following packages will be upgraded:
  libgcc1
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
  apt libapt-pkg4.12 (due to apt) libstdc++6 (due to apt)
1 upgraded, 1 newly installed, 154 to remove and 0 not upgraded.
Need to get 54.3 kB of archives.
After this operation, 543 MB disk space will be freed.
You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

我认为删除它们是不行的...这是我的/etc/apt/sources.list

###### Ubuntu Main Repos
deb http://nl.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 
deb-src http://nl.archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://nl.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb http://nl.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 
deb-src http://nl.archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse 
deb-src http://nl.archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu trusty partner
deb-src http://archive.canonical.com/ubuntu trusty partner

什么可能导致这些依赖性错误?

我希望你能帮助我。如果你需要更多信息,请直接询问。

提前致谢!

相关内容