无法从 Ubuntu 22.10 升级 - 软件包已被保留:libgd-dev libgd3 libgd3:i386

无法从 Ubuntu 22.10 升级 - 软件包已被保留:libgd-dev libgd3 libgd3:i386

对于使用 Linux/Ubuntu,我是一个门外汉。我的 Ubuntu 22.10 无法升级。我尝试了在互联网上可以找到的所有方法:

apt update
apt upgrade
apt full-upgrade 

这是日志:

hp@hp-workstation:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.10
Release:    22.10
Codename:   kinetic


hp@hp-workstation:/etc/apt$ sudo apt update
Hit:1 http://download.onlyoffice.com/repo/debian squeeze InRelease
Hit:2 https://download.docker.com/linux/ubuntu kinetic InRelease                                                                                                                                                                             
Hit:3 http://packages.microsoft.com/repos/code stable InRelease                                                                                                                                                                              
Hit:4 https://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                                                                                
Ign:5 https://repo.vivaldi.com/stable/deb stable InRelease                                                                                                                                                                                   
Hit:6 https://repo.vivaldi.com/stable/deb stable Release                                                                                                                                                                                     
Hit:7 https://repo.protonvpn.com/debian stable InRelease                                                                                                                                                                                     
Hit:9 https://cli.github.com/packages stable InRelease                                                                                                                                                                                       
Hit:10 https://packages.microsoft.com/repos/edge stable InRelease                                                                                                                                                                            
Hit:11 http://old-releases.ubuntu.com/ubuntu kinetic InRelease                                                                                                                                                                               
Hit:12 http://old-releases.ubuntu.com/ubuntu kinetic-updates InRelease                                                                                                                                         
Hit:13 https://apt.syncthing.net syncthing InRelease                                                                                                                   
Hit:14 https://ppa.launchpadcontent.net/alex-p/tesseract-ocr-devel/ubuntu kinetic InRelease
Hit:15 https://download.sublimetext.com apt/stable/ InRelease                                                                     
Hit:16 http://old-releases.ubuntu.com/ubuntu kinetic-backports InRelease                                                          
Get:17 https://mega.nz/linux/repo/xUbuntu_22.10 ./ InRelease [2,961 B]                                      
Hit:18 http://old-releases.ubuntu.com/ubuntu kinetic-security InRelease                                                   
Hit:19 https://ppa.launchpadcontent.net/christian-boxdoerfer/fsearch-stable/ubuntu kinetic InRelease
Ign:20 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu kinetic InRelease
Hit:21 https://ppa.launchpadcontent.net/hluk/copyq/ubuntu kinetic InRelease
Hit:22 https://ppa.launchpadcontent.net/inkscape.dev/stable/ubuntu kinetic InRelease
Hit:23 https://ppa.launchpadcontent.net/jcfp/nobetas/ubuntu kinetic InRelease
Ign:24 https://ppa.launchpadcontent.net/micahflee/ppa/ubuntu kinetic InRelease
Hit:25 https://ppa.launchpadcontent.net/ondrej/php/ubuntu jammy InRelease
Err:26 https://ppa.launchpadcontent.net/flatpak/stable/ubuntu kinetic Release                                                                                                                                                                
  404  Not Found [IP: 2620:2d:4000:1::3e 443]
Err:27 https://ppa.launchpadcontent.net/micahflee/ppa/ubuntu kinetic Release                                                                                                                                                                 
  404  Not Found [IP: 2620:2d:4000:1::3e 443]
Reading package lists... Done                                                                                                                                                                                                                
W: Skipping acquire of configured file 'universe/binary-amd64/Packages' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/binary-i386/Packages' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/i18n/Translation-en' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/i18n/Translation-en_IN' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/i18n/Translation-en_GB' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/dep11/Components-amd64.yml' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/dep11/icons-48x48.tar' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/dep11/icons-64x64.tar' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/dep11/[email protected]' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Skipping acquire of configured file 'universe/cnf/Commands-amd64' as repository 'http://download.onlyoffice.com/repo/debian squeeze InRelease' doesn't have the component 'universe' (component misspelt in sources.list?)
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:7
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:7
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:19
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:29
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:13
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:13
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:21
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:31
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:44
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:44
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:46
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:48
E: The repository 'https://ppa.launchpadcontent.net/flatpak/stable/ubuntu kinetic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'https://ppa.launchpadcontent.net/micahflee/ppa/ubuntu kinetic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:7
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:7
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:19
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:6 and /etc/apt/sources.list:29
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:13
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:13
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:21
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:12 and /etc/apt/sources.list:31
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:39 and /etc/apt/sources.list:40
W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:44
W: Target Sources (restricted/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:44
W: Target Sources (universe/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:46
W: Target Sources (multiverse/source/Sources) is configured multiple times in /etc/apt/sources.list:43 and /etc/apt/sources.list:48



hp@hp-workstation:~$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libgd-dev libgd3 libgd3:i386
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.





hp@hp-workstation:~$ sudo apt install libgd-dev libgd3 libgd3:i386
Reading package lists... Done
Building dependency tree... Done
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:
 libgd3 : Depends: libavif13 (>= 0.9.3) but it is not installable
          Breaks: libgd3:i386 (!= 2.3.3-9+ubuntu22.04.1+deb.sury.org+1) but 2.3.3-6+ubuntu22.04.1+deb.sury.org+1 is to be installed
 libgd3:i386 : Breaks: libgd3 (!= 2.3.3-6+ubuntu22.04.1+deb.sury.org+1) but 2.3.3-9+ubuntu22.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.



hp@hp-workstation:~$ sudo apt-get --with-new-pkgs upgrade  libgd-dev libgd3 libgd3:i386
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... 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:
 libgd3 : Depends: libavif13 (>= 0.9.3) but it is not installable
          Breaks: libgd3:i386 (!= 2.3.3-9+ubuntu22.04.1+deb.sury.org+1) but 2.3.3-6+ubuntu22.04.1+deb.sury.org+1 is to be installed
 libgd3:i386 : Breaks: libgd3 (!= 2.3.3-6+ubuntu22.04.1+deb.sury.org+1) but 2.3.3-9+ubuntu22.04.1+deb.sury.org+1 is to be installed
E: Broken packages





hp@hp-workstation:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libgd-dev libgd3 libgd3:i386
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

我只想摆脱这个 22.10,但保留的 3 个软件包阻止了我进行升级。我已经复制粘贴了我能找到的所有命令(半生不熟的理解),但没有任何效果。因此我提出了这个问题。

他们说,其Ask Ubutu 上的题外话

更新:

(base) hp@hp-workstation:~$ grep -r ondrej /etc/apt
/etc/apt/sources.list.d/ondrej-ubuntu-php-kinetic.list:deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main
/etc/apt/sources.list.d/ondrej-ubuntu-php-kinetic.list:# deb-src https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ kinetic main
/etc/apt/sources.list.d/ondrej-ubuntu-php-kinetic.list.save:deb https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ jammy main
/etc/apt/sources.list.d/ondrej-ubuntu-php-kinetic.list.save:# deb-src https://ppa.launchpadcontent.net/ondrej/php/ubuntu/ kinetic main

答案1

如果您的最终目标是升级到 23.04,最好的方法是禁用有问题的 PPA:

sudo add-apt-repository -r ppa:ondrej/php
sudo apt update

如果这不起作用,请删除存储库配置文件:

sudo rm /etc/apt/sources.list.d/ondrej-ubuntu-php-kinetic.list
sudo apt update

然后您应该发现不再有任何升级候选者。

相关内容