Ubuntu
弄亂了我的 apt repo 列表,可能連結到語言包
我在更新 pop os 時遇到問題,因為我的 apt repo 列表似乎無法正常工作。可能與語言包問題有關,但我不知道如何擺脫這個錯誤。
當我做
#sudo apt-get update tcapelle a[55/444] Hit:1 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease Hit:2 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal-security InRelease Hit:3 [http://apt.pop-os.org/proprietary](http://apt.pop-os.org/proprietary) focal InRelease Hit:4 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal-updates InRelease Hit:5 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal-backports InRelease Ign:6 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal/main all Packages Ign:6 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal/main all Packages Err:6 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal/main all Packages 404 Not Found \[IP: [91.189.91.38](https://91.189.91.38) 80\] Hit:7 [http://ppa.launchpad.net/system76/pop/ubuntu](http://ppa.launchpad.net/system76/pop/ubuntu) focal InRelease Get:8 [https://download.docker.com/linux/ubuntu](https://download.docker.com/linux/ubuntu) focal InRelease \[36.2 kB\] Hit:9 [https://repo.skype.com/deb](https://repo.skype.com/deb) stable InRelease Hit:10 [http://packages.microsoft.com/repos/vscode](http://packages.microsoft.com/repos/vscode) stable InRelease Hit:11 [https://packages.microsoft.com/repos/ms-teams](https://packages.microsoft.com/repos/ms-teams) stable InRelease Hit:12 [https://packagecloud.io/slacktechnologies/slack/debian](https://packagecloud.io/slacktechnologies/slack/debian) jessie InRelease Fetched 36.2 kB in 22s (1,661 B/s) Reading package lists... Done W: Skipping acquire of configured file 'restricted/source/Sources' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'universe/source/Sources' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'universe' (component misspelt in sources.list?) W: Skipping acquire of configured file 'multiverse/source/Sources' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'multiverse' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/binary-i386/Packages' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/binary-amd64/Packages' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/binary-all/Packages' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/i18n/Translation-en' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/i18n/Translation-en\_US' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/dep11/Components-all.yml' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/dep11/Components-amd64.yml' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/dep11/icons-48x48.tar' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/dep11/icons-64x64.tar' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/dep11/icons-64x64@2.tar' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/dep11/icons-128x128.tar' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/cnf/Commands-all' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?) W: Skipping acquire of configured file 'restricted/cnf/Commands-amd64' as repository '[http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) focal InRelease' doesn't have the component 'restricted' (component misspelt in sources.list?)
如果我查看我的 sources.list 文件,它看起來很正常:
# deb cdrom:[Pop_OS 20.04 _Focal Fossa_ - Release amd64 (20200617)]/ focal main restricted deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse deb http://apt.pop-os.org/proprietary focal main # deb-src http://apt.pop-os.org/proprietary focal main deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable # deb-src [arch=amd64] https://download.docker.com/linux/ubuntu focal stable
中的其他文件:
/etc/apt/sources.list.d
drwxr-xr-x 2 root root 4.0K Nov 6 19:29 . drwxr-xr-x 7 root root 4.0K Nov 12 06:25 .. -rw-r--r-- 1 root root 69 Aug 10 11:44 bluetooth-ubuntu-bluez-focal.list.save -rw-r--r-- 1 root root 56 Oct 23 10:26 skype-stable.list -rw-r--r-- 1 root root 193 Sep 17 14:42 slack.list -rw-r--r-- 1 root root 193 Sep 17 14:42 slack.list.save -rw-r--r-- 1 root root 50 Aug 10 11:44 spotify.list.save -rw-r--r-- 1 root root 124 Sep 17 14:42 system76-ubuntu-pop-focal.list -rw-r--r-- 1 root root 124 Sep 17 14:42 system76-ubuntu-pop-focal.list.save -rw-r--r-- 1 root root 196 Oct 16 14:00 teams.list -rw-r--r-- 1 root root 193 Sep 17 14:42 vscode.list -rw-r--r-- 1 root root 193 Sep 17 14:42 vscode.list.save
任何想法?
這解決了我的問題:首先,清理可能已損壞的 APT 列表:
sudo rm /var/lib/apt/lists/* -vf
然後,清理 Debian 打包模組:
sudo mv /var/lib/dpkg/status /var/lib/dpkg/status-bad
並用以前的工作模組替換壞的包裝模組:
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status
更新儲存庫:
sudo apt-get update
不是答案,而是一些調試說明:
- 報錯的IP是從URI中正確指向的
$ nslookup us.archive.ubuntu.com Non-authoritative answer: Name: us.archive.ubuntu.com Address: 91.189.91.38
當我檢查 InRelase 文件是否有問題時,我根據您的第一個警告對其進行了檢查:
$ wget http://us.archive.ubuntu.com/ubuntu/dists/focal/InRelease $ grep restricted/source/Sources InRelease 074fdbcb6436a55b3289dd0b1700f747 37681 restricted/source/Sources
這個 InRelease 文件當然有一個受限制的組件。即使沒有,我也查看了應該指向的 Sources.gz,它確實存在。
$ wget http://us.archive.ubuntu.com/ubuntu/dists/focal/restricted/source/Sources.gz HTTP request sent, awaiting response... 200 OK Sources.gz 100%[============================================================================>] 7.03K --.-KB/s in 0.02s
你在找哪個翻譯?如果查找,我
en_CA
確實發現它只是在main
,universe
而ru
在main
,,,,multiverse``restricted``universe
$ grep Translation-en_CA InRelease 8e43eb4048d41d24b070726f61de4a0d 11684 main/i18n/Translation-en_CA 694465955cefc44304388cc9e66a9ae8 1858 universe/i18n/Translation-en_CA $ grep Translation-ru InRelease 07e6358033ea05ed3dd0217fad125bec 2574447 main/i18n/Translation-ru a511b443d0a0ad65aef4fac59f2d7d2a 316225 multiverse/i18n/Translation-ru 6586f7f8446a61e48ff1a4e65b800a2d 8515 restricted/i18n/Translation-ru f7b3223a7dae2f917dda9d19473ce67b 8102575 universe/i18n/Translation-ru