问题描述
(此问题未得到解决。由于时间限制,计算机已恢复出厂设置。)
我试图从14.04升级到16.04,但是apt
抛出了这个错误:
The required dependency 'apt (>= 1.0.1ubuntu2.13)' is not installed.
这意味着什么,我该如何解决?
当我输入命令apt-cache policy apt时
Shageenth@shageenth-Inspiron-3451:~$ apt-cache policy apt apt:
Installed: 1.0.1ubuntu2.11
Candidate: 1.0.1ubuntu2.11
Version table:
*** 1.0.1ubuntu2.11 0
100 /var/lib/dpkg/status
1.0.1ubuntu2 0
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64
Packages
运行命令时发生错误:
sudo do-release-upgrade -d
它产生以下结果:
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [198 B]
Get:2 Upgrade tool [1,265 kB]
Fetched 1,265 kB in 0s (0 B/s)
authenticate 'xenial.tar.gz' against 'xenial.tar.gz.gpg'
extracting 'xenial.tar.gz'
Reading cache
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Building data structures... Done
Required depends is not installed
The required dependency 'apt (>= 1.0.1ubuntu2.13)' is not installed.
最佳解决办法
我今天遇到了完全相同的问题。在升级之前,请确保您的版本是最新的Ubuntu 14.04版本。 (此时为Ubuntu 14.04.4)
由于镜像不好,我被Ubuntu 14.04.3困住了。
首先运行:
sudo apt update
sudo apt dist-upgrade
确保该版本现在是Ubuntu 14。04。4(2016年9月更新:Ubuntu 14.04.5)。
cat /etc/lsb-release
并启动Ubuntu 16.04安装
sudo do-release-upgrade -d
次佳解决办法
最好始终通过以下常规程序更新:
sudo apt update
sudo apt dist-upgrade
如果上述操作失败,则您可以手动执行以下操作。这个问题已经过时,但您可以更改版本号,因为链接应该仍然相同。
要从终端窗口升级您的apt
版本,请键入以下内容:
sudo apt-get download apt
如果上述方法不起作用,您也可以通过运行以下行来下载wget
:
wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/apt_1.0.1ubuntu2.17_amd64.deb
然后输入
sudo dpkg -i apt*.deb
刚刚在我的系统上试过这个。这是输出:
terrance@terrance-VirtualBox:~$ sudo apt-get download apt
[sudo] password for terrance:
Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main apt amd64 1.0.1ubuntu2.17 [954 kB]
Fetched 954 kB in 0s (1,127 kB/s)
terrance@terrance-VirtualBox:~$ ls
apt_1.0.1ubuntu2.17_amd64.deb Documents examples.desktop Pictures Templates
Desktop Downloads Music Public Videos
terrance@terrance-VirtualBox:~$ sudo dpkg -i apt*.deb
(Reading database ... 168376 files and directories currently installed.)
Preparing to unpack apt_1.0.1ubuntu2.17_amd64.deb ...
Unpacking apt (1.0.1ubuntu2.17) over (1.0.1ubuntu2.11) ...
Setting up apt (1.0.1ubuntu2.17) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
如果在描述的步骤之后您看到由于缺少dpkg依赖性而导致失败,您可以通过重复dpkg和…的步骤来完成。
wget http://security.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.18.24ubuntu1_amd64.deb
sudo dpkg -i dpkg_1.18.24ubuntu1_amd64.deb
可以在这里找到Ubuntu可用的所有软件包:
http://security.ubuntu.com/ubuntu/pool/main/