Apt

sudo apt dist-upgrade 嘗試安裝第三方 ppa 中不存在的軟體包

  • September 16, 2021

我在我的 ubuntu 20.04 中安裝了 parrotOS PPA,所以我可以輕鬆安裝和更新黑客工具。

然後我正在更新/etc/apt/preferences.d/parrot-pinning,以便執行以下操作:

  • 如果一個工具同時存在於 ubuntu ppa 和 parrotOS ppa 中,它將從 ubuntu 安裝(所以我將Pin-Priorityubuntu 更改為高於 parrot)

內容/etc/apt/preferences.d/parrot-pinning

Package: *
Pin: release o=Parrot
Pin-Priority: 500

Package: *
Pin: release o=Debian
Pin-Priority: 700

Package: *
Pin: release o=Kali
Pin-Priority: 50

Package: *
Pin: release o=Ubuntu
Pin-Priority: 1001

我的問題是

在執行此sudo apt dist-upgrade操作時,apt 正在嘗試將 parrotOS PPA 中的工具更新到鏡像中不存在的版本。

執行命令後的摘錄:

Deseja continuar? [S/n] S                #note the Y/n option to continue with upgrade
Err:1 https://mirrors.up.pt/parrot rolling/main amd64 codium amd64 1.60.0-1630974030
 404  Not Found [IP: 2001:690:2200:1200::15 443]
Err:2 https://mirrors.up.pt/parrot rolling/non-free amd64 oracle-instantclient-basic amd64 19.6.0.0.0-0parrot1
 404  Not Found [IP: 2001:690:2200:1200::15 443]
Err:3 https://mirrors.up.pt/parrot rolling/main amd64 metasploit-framework amd64 6.1.2-0parrot1
 404  Not Found [IP: 2001:690:2200:1200::15 443]

在 url 之後,文件不存在,最新的 codium 版本是codium_1.56.2-1620951495_amd64.deb

輸出ubuntu-security-status

2139 packages installed, of which:
1877 receive package updates with LTS until 4/2025
247 could receive security updates with ESM Apps until 4/2030
 14 packages are from third parties
  1 package is no longer available for download

Packages from third parties are not provided by the official Ubuntu
archive, for example packages from Personal Package Archives in
Launchpad.
For more information on the packages, run 'ubuntu-security-status
--thirdparty'.

Packages that are not available for download may be left over from a
previous release of Ubuntu, may have been installed directly from a
.deb file, or are from a source which has been disabled.
For more information on the packages, run 'ubuntu-security-status
--unavailable'.

Enable Extended Security Maintenance (ESM Apps) to get 1 security
update (so far) and enable coverage of 247 packages.

This machine is not attached to an Ubuntu Advantage subscription.
See https://ubuntu.com/advantage

輸出sudo apt update:(將文本翻譯成英文)

Atg:1 http://pt.archive.ubuntu.com/ubuntu focal InRelease
Atg:2 http://pt.archive.ubuntu.com/ubuntu focal-updates InRelease              
Atg:3 http://pt.archive.ubuntu.com/ubuntu focal-backports InRelease            
Atg:4 http://packages.microsoft.com/repos/code stable InRelease                
Atg:5 http://security.ubuntu.com/ubuntu focal-security InRelease               
Atg:6 https://repo.pritunl.com/stable/apt focal InRelease                      
Atg:7 https://packages.microsoft.com/repos/ms-teams stable InRelease           
Atg:8 https://deb.parrot.sh/parrot rolling InRelease        
Atg:9 https://deb.parrot.sh/parrot rolling-security InRelease
Reading package list...
building dependency tree...       
Reading state information...
36 packets can be upgraded. run 'apt list --upgradable' to see them.

這是您的鏡像的問題,而不是您的 pin 設置的問題:該文件列在packages list 中,並且確實從repo中失去

改變你的鏡子

引用自:https://unix.stackexchange.com/questions/669190