apt-get 更新,取消链接

Mat*_* S. 2 upgrade updates apt 16.04

我最近搬到了 xenial ubuntu。升级后,我无法再运行了

sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

输出如下:

Get:1 http://it.archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Hit:2 http://it.archive.ubuntu.com/ubuntu xenial-updates  InRelease             
Hit:3 http://it.archive.ubuntu.com/ubuntu xenial-backports InRelease           
Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease              
Hit:5 http://archive.canonical.com xenial InRelease                            
Hit:6 http://repository.spotify.com stable InRelease                           
Fetched 247 kB in 0s (307 kB/s)                                                
Reading package lists... Done
W: Problem unlinking the file backup - Clean (21: Is a directory)
Run Code Online (Sandbox Code Playgroud)

我试过用谷歌搜索这个特定的问题,但没有成功。感谢您的帮助

Mat*_* S. 6

我找到了一个解决方案 :) 在这里你可以找到一个类似的问题:“线程:软件升级问题:aptdaemon ”。

问题来自以下目录:

/var/lib/apt/lists/partial
Run Code Online (Sandbox Code Playgroud)

因此执行以下操作:

sudo rm -rf /var/lib/apt/lists
sudo apt-get update
Run Code Online (Sandbox Code Playgroud)

成功了:)