我在 sudo apt-get update 上收到以下错误。
sudo apt-get update
Hit:1 http://ppa.launchpad.net/qbittorrent-team/qbittorrent-stable/ubuntu xenial InRelease
Hit:2 https://repo.skype.com/deb unstable InRelease
Hit:3 https://dl.yarnpkg.com/debian stable InRelease
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:5 http://apt.postgresql.org/pub/repos/apt xenial-pgdg InRelease
Hit:6 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:7 https://download.sublimetext.com apt/stable/ InRelease
Hit:8 http://dl.google.com/linux/chrome/deb stable Release
Hit:9 https://ftp.ussg.iu.edu/CRAN/bin/linux/ubuntu xenial/ InRelease
Hit:12 https://cli-assets.heroku.com/branches/stable/apt ./ InRelease
Hit:13 http://ppa.launchpad.net/webupd8team/sublime-text-2/ubuntu xenial InRelease
Get:11 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease [17.5 kB]
Ign:16 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main Translation-en
Hit:14 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 Packages
Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main i386 Packages
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main i386 Packages
Ign:16 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main Translation-en
Ign:16 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main Translation-en
Hit:14 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 Packages
Ign:14 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 Packages
Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main i386 Packages
Ign:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main i386 Packages
Err:16 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main Translation-en
Could not open file /var/lib/apt/lists/partial/ppa.launchpad.net_webupd8team_java_ubuntu_dists_xenial_main_i18n_Translation-en.xz - open (13: Permission denied)
Hit:14 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main amd64 Packages
Hit:15 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial/main i386 Packages
Fetched 17.5 kB in 39s (446 B/s)
E: Failed to fetch http://ppa.launchpad.net/webupd8team/java/ubuntu/dists/xenial/main/i18n/Translation-en Could not open file /var/lib/apt/lists/partial/ppa.launchpad.net_webupd8team_java_ubuntu_dists_xenial_main_i18n_Translation-en.xz - open (13: Permission denied)
E: Some index files failed to download. They have been ignored, or old ones used instead.
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
如能得到快速帮助我们将非常感激。
谢谢
答案1
您有一个具有无效权限的文件,可以将其删除:
sudo rm /var/lib/apt/lists/partial/ppa.launchpad.net_webupd8team_java_ubuntu_dists_xenial_main_i18n_Translation-en.xz
您也可以运行此命令来清除 apt 缓存:
sudo apt clean
此后您的apt update
命令应该可以按预期工作。