Не удалось исправить проблемы, у вас были поврежденные пакеты Ubuntu 20.04 LTS

Во время обновления Ubuntu 20.04, i ' m получаю это:

sudo apt update
Hit:1 http://download.opensuse.org/repositories/home:/stevenpusser/xUbuntu_20.04  InRelease
Hit:2 http://deb.debian.org/debian buster InRelease                                                                                   
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease                                                                                
Hit:4 http://deb.debian.org/debian buster-updates InRelease                                                                           
Hit:5 https://brave-browser-apt-release.s3.brave.com stable InRelease                                                                 
Hit:6 https://linux.teamviewer.com/deb stable InRelease                                                                               
Hit:7 http://deb.debian.org/debian-security buster/updates InRelease                                                                  
Hit:8 http://archive.ubuntu.com/ubuntu focal-updates InRelease                                                              
Hit:9 http://archive.canonical.com/ubuntu focal InRelease                                             
Hit:10 http://archive.ubuntu.com/ubuntu focal-backports InRelease               
Hit:11 http://archive.ubuntu.com/ubuntu focal-security InRelease                
Hit:12 http://ppa.launchpad.net/openshot.developers/ppa/ubuntu focal InRelease
Hit:13 http://ppa.launchpad.net/phoerious/keepassxc/ubuntu focal InRelease
Hit:14 http://ppa.launchpad.net/ubuntuhandbook1/audacity/ubuntu focal InRelease
Hit:15 http://dl.google.com/linux/chrome/deb stable InRelease
Reading package lists... Done
Building dependency tree       
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.

Затем я запускаю:

sudo apt list --upgradable
Listing... Done
libfile-fcntllock-perl/stable 0.22-3+b5 amd64 [upgradable from: 0.22-3build4]
python3-netifaces/stable 0.10.4-1+b1 amd64 [upgradable from: 0.10.4-1ubuntu4]

Затем мне нужно обновить (те же результаты на sudo apt dist-upgrade и sudo apt full- upgrade ):

sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Теперь я пытаюсь вручную переустановить эти 2 пакета, как показано ниже:

sudo apt install libfile-fcntllock-perl --reinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libfile-fcntllock-perl : Depends: perlapi-5.28.0
E: Unable to correct problems, you have held broken packages.


sudo apt install python3-netifaces --reinstall
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 python3-netifaces : Depends: python3 (< 3.8) but 3.8.2-0ubuntu2 is to be installed
E: Unable to correct problems, you have held broken packages.

Поиск уродливых пакетов:

sudo apt search libfile-fcntllock-perl
Sorting... Done
Full Text Search... Done
libfile-fcntllock-perl/stable 0.22-3+b5 amd64 [upgradable from: 0.22-3build4]
  Perl module for file locking with fcntl(2)


sudo apt search python3-netifaces
Sorting... Done
Full Text Search... Done
python3-netifaces/stable 0.10.4-1+b1 amd64 [upgradable from: 0.10.4-1ubuntu4]
  portable network interface information - Python 3.x

Я также пробовал с sudo apt install -f :

sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
0
задан 2 June 2021 в 23:37

1 ответ

Проблема была в том, что я добавил репозитории debian в мою ubuntu, чтобы установить некоторые пакеты оттуда. Эти 2 файла (libfile-fcntllock-perl и python3-netifaceswere) были случайно обновлены из debian repos, но добавление этих репозиториев было плохой идеей, поэтому я переустановил ubuntu.

0
ответ дан 28 July 2021 в 11:33

Другие вопросы по тегам:

Похожие вопросы: