[SOLVED] apt-get upgrade isn't working

mido45

New Member
Jul 18, 2022
12
1
3
Hi,

I am not an administrator but using Proxmox to run some VMs as lab.
I have the latest version PVE 8.2.4, From the web I was routinely updating the system but apt-get upgrade interrupted because of Power outage .
Once the power is restored I tried apt-get upgrade once again but there is a problem with a python package "python3-idna"
I was getting the following error
E: The package python3-idna needs to be reinstalled, but I can't find an archive for it.
Because I was stuck with this error I attempted to remove this package multiple times but since there are other packages that depends on it that made it hard.
Code:
apt-cache rdepends python3-idna
python3-idna Reverse Depends: 
python3-requests 
python3-urllib3 
python3-requests
I used this command to force delete the python3-idna package so I can later reinstall it using the following command
Code:
dpkg --remove --force-remove-reinstreq --purge --force-depends python3-idna

The package was deleted but I can't install it again
Code:
apt-get install python3-idna
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python3-idna is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python3-idna' has no installation candidate

Also when run "apt --fix-broken install" I got the following which seems not very safe it will remove important packages that will may be make the system not usable

Code:
apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  fonts-font-logos libboost-program-options1.74.0 libjs-sencha-touch libnet-subnet-perl libpve-network-perl libpve-notify-perl libslirp0 liburing2
  proxmox-default-kernel proxmox-firewall proxmox-kernel-6.2 proxmox-kernel-6.2.16-10-pve proxmox-kernel-6.2.16-12-pve proxmox-kernel-6.2.16-14-pve
  proxmox-kernel-6.2.16-15-pve proxmox-kernel-6.2.16-19-pve proxmox-kernel-6.2.16-20-pve proxmox-kernel-6.2.16-6-pve proxmox-kernel-6.2.16-8-pve
  proxmox-kernel-6.5.11-5-pve-signed proxmox-kernel-6.5.11-6-pve-signed proxmox-kernel-6.5.11-7-pve-signed proxmox-kernel-6.5.11-8-pve-signed
  proxmox-kernel-6.5.13-1-pve-signed proxmox-kernel-6.8.4-2-pve-signed proxmox-kernel-6.8.4-3-pve-signed proxmox-kernel-helper proxmox-mail-forward
  proxmox-offline-mirror-docs proxmox-offline-mirror-helper pve-kernel-5.15.107-2-pve pve-kernel-6.2 pve-kernel-6.2.16-3-pve pve-kernel-6.2.16-4-pve
  pve-kernel-6.2.16-5-pve python3-charset-normalizer telnet
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  ceph-common glusterfs-client glusterfs-common libpve-guest-common-perl libpve-storage-perl proxmox-ve pve-container pve-esxi-import-tools pve-ha-manager
  pve-manager pve-qemu-kvm python3-pyvmomi python3-reportbug python3-requests qemu-server reportbug spiceterm
0 upgraded, 0 newly installed, 17 to remove and 4 not upgraded.
After this operation, 396 MB disk space will be freed.
Do you want to continue? [Y/n] n

I am asking about your opinions how to resolve such issue?
 
Last edited:
please post the output of

"apt update"

and

"apt-cache policy"

thanks!
 
  • Like
Reactions: mido45
please post the output of

"apt update"

and

"apt-cache policy"

thanks!

Thanks for the reply, please find the requested output

Code:
apt update
Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://ftp.debian.org/debian bookworm InRelease
Hit:3 http://download.proxmox.com/debian/pve bookworm InRelease
Hit:4 http://ftp.debian.org/debian bookworm-updates InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.

Code:
apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages
     release o=Proxmox,a=stable,n=bookworm,l=Proxmox Debian Repository,c=pve-no-subscription,b=amd64
     origin download.proxmox.com
 500 http://security.debian.org bookworm-security/contrib amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=contrib,b=amd64
     origin security.debian.org
 500 http://security.debian.org bookworm-security/main amd64 Packages
     release v=12,o=Debian,a=stable-security,n=bookworm-security,l=Debian-Security,c=main,b=amd64
     origin security.debian.org
 500 http://ftp.debian.org/debian bookworm-updates/contrib amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=contrib,b=amd64
     origin ftp.debian.org
 500 http://ftp.debian.org/debian bookworm-updates/main amd64 Packages
     release v=12-updates,o=Debian,a=stable-updates,n=bookworm-updates,l=Debian,c=main,b=amd64
     origin ftp.debian.org
 500 http://ftp.debian.org/debian bookworm/contrib amd64 Packages
     release v=12.6,o=Debian,a=stable,n=bookworm,l=Debian,c=contrib,b=amd64
     origin ftp.debian.org
 500 http://ftp.debian.org/debian bookworm/main amd64 Packages
     release v=12.6,o=Debian,a=stable,n=bookworm,l=Debian,c=main,b=amd64
     origin ftp.debian.org
Pinned packages:
 

I usually use the web for the updates. currently when using the commands I stuck with the error reported in the original post

Code:
root@pve1:~# apt-get update
Hit:1 http://ftp.debian.org/debian bookworm InRelease
Hit:2 http://security.debian.org bookworm-security InRelease
Hit:3 http://download.proxmox.com/debian/pve bookworm InRelease
Hit:4 http://ftp.debian.org/debian bookworm-updates InRelease
Reading package lists... Done
root@pve1:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3-requests : Depends: python3-idna but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
 
Hit:1 http://security.debian.org bookworm-security InRelease
Not sure how much difference it makes, but I've got:
Code:
Hit:2 http://security.debian.org/debian-security bookworm-security InRelease

Also you are missing (maybe you don't need it IDW):
Code:
Hit:4 http://download.proxmox.com/debian/ceph-quincy bookworm InRelease

I think you should check your repositories.
 
could you post the output of

Code:
apt install -f -s
 
could you post the output of

Code:
apt install -f -s
Here you go
Code:
apt install -f -s
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  fonts-font-logos libboost-program-options1.74.0 libjs-sencha-touch libnet-subnet-perl libpve-network-perl libpve-notify-perl libslirp0 liburing2
  proxmox-default-kernel proxmox-firewall proxmox-kernel-6.2 proxmox-kernel-6.2.16-10-pve proxmox-kernel-6.2.16-12-pve proxmox-kernel-6.2.16-14-pve
  proxmox-kernel-6.2.16-15-pve proxmox-kernel-6.2.16-19-pve proxmox-kernel-6.2.16-20-pve proxmox-kernel-6.2.16-6-pve proxmox-kernel-6.2.16-8-pve
  proxmox-kernel-6.5.11-5-pve-signed proxmox-kernel-6.5.11-6-pve-signed proxmox-kernel-6.5.11-7-pve-signed proxmox-kernel-6.5.11-8-pve-signed
  proxmox-kernel-6.5.13-1-pve-signed proxmox-kernel-6.8.4-2-pve-signed proxmox-kernel-6.8.4-3-pve-signed proxmox-kernel-helper proxmox-mail-forward
  proxmox-offline-mirror-docs proxmox-offline-mirror-helper pve-kernel-5.15.107-2-pve pve-kernel-6.2 pve-kernel-6.2.16-3-pve pve-kernel-6.2.16-4-pve
  pve-kernel-6.2.16-5-pve python3-charset-normalizer telnet
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  ceph-common glusterfs-client glusterfs-common libpve-guest-common-perl libpve-storage-perl proxmox-ve pve-container pve-esxi-import-tools pve-ha-manager
  pve-manager pve-qemu-kvm python3-pyvmomi python3-reportbug python3-requests qemu-server reportbug spiceterm
0 upgraded, 0 newly installed, 17 to remove and 4 not upgraded.
Remv proxmox-ve [8.2.0] [python3-requests:amd64 ]
Remv pve-manager [8.2.4] [python3-requests:amd64 ]
Remv spiceterm [3.3.0] [python3-requests:amd64 ]
Remv pve-container [5.1.12] [pve-ha-manager:amd64 python3-requests:amd64 ]
Remv pve-ha-manager [4.0.5] [python3-requests:amd64 qemu-server:amd64 ]
Remv qemu-server [8.2.1] [python3-requests:amd64 ]
Remv pve-qemu-kvm [9.0.0-3] [python3-requests:amd64 ]
Remv libpve-guest-common-perl [5.1.3] [python3-requests:amd64 ]
Remv libpve-storage-perl [8.2.3] [python3-requests:amd64 ]
Remv ceph-common [16.2.11+ds-2] [python3-requests:amd64 ]
Remv glusterfs-client [10.3-5] [python3-requests:amd64 ]
Remv glusterfs-common [10.3-5] [python3-requests:amd64 ]
Remv pve-esxi-import-tools [0.7.1] [python3-requests:amd64 ]
Remv python3-pyvmomi [6.7.1-4.1] [python3-requests:amd64 ]
Remv reportbug [12.0.0] [python3-requests:amd64 ]
Remv python3-reportbug [12.0.0] [python3-requests:amd64 ]
Remv python3-requests [2.28.1+dfsg-1]
 
yes, this seems very likely to be the cause.
 
yes, this seems very likely to be the cause.
I added the ceph repo
Code:
apt update
Hit:1 http://security.debian.org bookworm-security InRelease
Hit:2 http://ftp.debian.org/debian bookworm InRelease
Hit:3 http://download.proxmox.com/debian/pve bookworm InRelease
Hit:4 http://ftp.debian.org/debian bookworm-updates InRelease
Hit:5 http://download.proxmox.com/debian/ceph-reef bookworm InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
17 packages can be upgraded. Run 'apt list --upgradable' to see them.

There are more packages to update now but I still can't do it because of the error regarding python3-idna
Code:
Starting system upgrade: apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 python3-requests : Depends: python3-idna but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).


System not fully up to date (found 17 new packages)


starting shell

Should I install the missing package manually?
I found this https://ubuntu.pkgs.org/23.10/ubuntu-main-amd64/python3-idna_3.3-2_all.deb.html
should I install it using dpkg for example?
 
Have you tried now apt --fix-broken install & don't ever try apt upgrade or apt-get upgrade again.
 
  • Like
Reactions: mido45
Have you tried now apt --fix-broken install & don't ever try apt upgrade or apt-get upgrade again.
Ok got it
The issue with the command you suggested that it will remove important packages (that's from my perspective), it will remove:

Code:
ceph-common
glusterfs-client
glusterfs-common
libpve-guest-common-perl
libpve-storage-perl
proxmox-ve
pve-container
pve-esxi-import-tools
pve-ha-manager
pve-manager
pve-qemu-kvm
python3-pyvmomi
python3-reportbug
python3-requests
qemu-server
reportbug spiceterm

And here is the full output of the command

Code:
root@pve1:/etc/apt/sources.list.d# apt --fix-broken install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  fonts-font-logos libboost-program-options1.74.0 libjs-sencha-touch libnet-subnet-perl libpve-network-perl libpve-notify-perl libslirp0 liburing2
  proxmox-default-kernel proxmox-firewall proxmox-kernel-6.2 proxmox-kernel-6.2.16-10-pve proxmox-kernel-6.2.16-12-pve proxmox-kernel-6.2.16-14-pve
  proxmox-kernel-6.2.16-15-pve proxmox-kernel-6.2.16-19-pve proxmox-kernel-6.2.16-20-pve proxmox-kernel-6.2.16-6-pve proxmox-kernel-6.2.16-8-pve
  proxmox-kernel-6.5.11-5-pve-signed proxmox-kernel-6.5.11-6-pve-signed proxmox-kernel-6.5.11-7-pve-signed proxmox-kernel-6.5.11-8-pve-signed
  proxmox-kernel-6.5.13-1-pve-signed proxmox-kernel-6.8.4-2-pve-signed proxmox-kernel-6.8.4-3-pve-signed proxmox-kernel-helper proxmox-mail-forward
  proxmox-offline-mirror-docs proxmox-offline-mirror-helper pve-kernel-5.15.107-2-pve pve-kernel-6.2 pve-kernel-6.2.16-3-pve pve-kernel-6.2.16-4-pve
  pve-kernel-6.2.16-5-pve python3-charset-normalizer telnet
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  ceph-common glusterfs-client glusterfs-common libpve-guest-common-perl libpve-storage-perl proxmox-ve pve-container pve-esxi-import-tools pve-ha-manager
  pve-manager pve-qemu-kvm python3-pyvmomi python3-reportbug python3-requests qemu-server reportbug spiceterm
0 upgraded, 0 newly installed, 17 to remove and 16 not upgraded.
After this operation, 396 MB disk space will be freed.
Do you want to continue? [Y/n]
 
Can you check if you have different output when you run "apt-cache policy python3-idna"

Code:
apt-cache policy python3-idna
python3-idna:
  Installed: (none)
  Candidate: (none)
  Version table:

The output shows that the package is not installed and has no candidate, And the same when I try to install it using "apt install"

Code:
apt install  python3-idna
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python3-idna is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source


E: Package 'python3-idna' has no installation candidate
 
I went ahead and installed "python3-idna" manually using "dpkg -i" and I think that helped and installed the 4 packages that wasn't able to update from before.

Code:
root@pve1:~# dpkg -i python3-idna_3.3-2ubuntu0.1_all.deb
Selecting previously unselected package python3-idna.
(Reading database ... 221210 files and directories currently installed.)
Preparing to unpack python3-idna_3.3-2ubuntu0.1_all.deb ...
Unpacking python3-idna (3.3-2ubuntu0.1) ...
Setting up python3-idna (3.3-2ubuntu0.1) ...

root@pve1:~# apt show python3-idna
Package: python3-idna
Version: 3.3-2ubuntu0.1
Status: install ok installed
Priority: optional
Section: python
Source: python-idna
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Debian Python Team <team+python@tracker.debian.org>
Installed-Size: 340 kB
Depends: python3:any
Homepage: https://github.com/kjd/idna
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: Python IDNA2008 (RFC 5891) handling (Python 3)
 A library to support the Internationalised Domain Names in Applications (IDNA)
 protocol as specified in RFC 5891. This version of the protocol is often
 referred to as “IDNA2008” and can produce different results from the earlier
 standard from 2003.
 .
 The library is also intended to act as a suitable drop-in replacement for the
 “encodings.idna” module that comes with the Python standard library but
 currently only supports the older 2003 specification.
 .
 This package contains the module for Python 3.



Updates from ceph is not working, may be because the current version is very old to renew

1719920877575.png

Code:
Starting system upgrade: apt-get dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  proxmox-kernel-6.2 proxmox-kernel-6.2.16-10-pve proxmox-kernel-6.2.16-12-pve
  proxmox-kernel-6.2.16-14-pve proxmox-kernel-6.2.16-15-pve
  proxmox-kernel-6.2.16-19-pve proxmox-kernel-6.2.16-20-pve
  proxmox-kernel-6.2.16-6-pve proxmox-kernel-6.2.16-8-pve
  proxmox-kernel-6.5.11-5-pve-signed proxmox-kernel-6.5.11-6-pve-signed
  proxmox-kernel-6.5.11-7-pve-signed proxmox-kernel-6.5.11-8-pve-signed
  proxmox-kernel-6.5.13-1-pve-signed proxmox-kernel-6.8.4-2-pve-signed
  proxmox-kernel-6.8.4-3-pve-signed pve-kernel-5.15.107-2-pve pve-kernel-6.2
  pve-kernel-6.2.16-3-pve pve-kernel-6.2.16-4-pve pve-kernel-6.2.16-5-pve
  telnet
Use 'apt autoremove' to remove them.
The following packages have been kept back:
  ceph-common ceph-fuse libcephfs2 librados2 libradosstriper1 librbd1 librgw2
  python3-ceph-argparse python3-ceph-common python3-cephfs python3-rados
  python3-rbd python3-rgw
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.


System not fully up to date (found 13 new packages)


starting shell
root@pve1:/#
 
python3-idna should definitely be in the bookworm repository (in version 3.3-1+deb12u1).. something is wrong on your system still..
 
python3-idna should definitely be in the bookworm repository (in version 3.3-1+deb12u1).. something is wrong on your system still..
I agree but anyways now when I search for the update at least I get a response

Code:
apt-get install python3-idna
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3-idna is already the newest version (3.3-2ubuntu0.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Not sure whenever there will be a next update for this package, will it update using apt or not?!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!