尝试从 10.04 升级到 12.04 时出现问题

尝试从 10.04 升级到 12.04 时出现问题

当我尝试将服务器从 ubuntu 10.04 升级到 12.04 时,我遇到了一些软件包问题。它说,

sudo apt-get dist-upgrade
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:
      gcc-4.4: Depends: gcc-4.4-base (= 4.4.7-1ubuntu2) but 4.4.3-4ubuntu5.1 is installed
               Depends: cpp-4.4 (= 4.4.7-1ubuntu2) but 4.4.3-4ubuntu5.1 is installed
               Depends: binutils (>= 2.20.1-15~) but 2.20.1-3ubuntu7.1 is installed
               Depends: libgcc1 (>= 1:4.4.7-1ubuntu2) but 1:4.4.3-4ubuntu5.1 is installed
               Recommends: libc6-dev (>= 2.13-0ubuntu6) but it is not installed
      libnih-dbus1: Depends: libnih1 (= 1.0.3-4ubuntu9.1) but 1.0.1-1 is installed
      libnih1: Depends: libc6 (< 2.12) but 2.15-0ubuntu10.5 is installed
    E: Unmet dependencies. Try using -f.

答案1

先尝试

sudo apt-get update -f

或者

sudo apt-get update --fix-missing

然后

sudo apt-get upgrade

然后

sudo apt-get dist-upgrade

希望它能为你工作,如果不行请检查你损坏的 repo(包)

相关内容