I'm using Debian10/KDE and since a few months ago one package was kept back. However, when using sudo apt update
instead of sudo apt-get update
it displays something else and allows to see the "additional version".
Why is that? Shouldn't this also be displayed with apt-get? Shouldn't it simply install version 2.8.5? (Why isn't it? How can it be installed?)
sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
python3-psycopg2
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
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.
sudo apt update
Reading package lists... Done
Building dependency tree
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
apt list --upgradable
Listing... Done
python3-psycopg2/stretch-pgdg 2.8.5-1~pgdg90+1 amd64 [upgradable from: 2.7.7-1]
N: There is 1 additional version. Please use the '-a' switch to see it
apt list --upgradable -a
Listing... Done
python3-psycopg2/stretch-pgdg 2.8.5-1~pgdg90+1 amd64 [upgradable from: 2.7.7-1]
python3-psycopg2/stable,now 2.7.7-1 amd64 [installed,upgradable to: 2.8.5-1~pgdg90+1]
Trying to debug further:
apt policy python3-psycopg2
python3-psycopg2:
Installed: 2.7.7-1
Candidate: 2.8.5-1~pgdg90+1
Version table:
2.8.5-1~pgdg90+1 500
500 http://apt.postgresql.org/pub/repos/apt stretch-pgdg/main amd64 Packages
*** 2.7.7-1 500
500 http://ftp.XX.debian.org/debian buster/main amd64 Packages
100 /var/lib/dpkg/status
sudo apt install python3-psycopg2
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-psycopg2 : Depends: python3 (< 3.6) but 3.7.3-1 is to be installed
E: Unable to correct problems, you have held broken packages.
Unlike in the linked question the usual sudo apt-get --with-new-pkgs upgrade
doesn't work here:
sudo apt-get --with-new-pkgs 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.
Whatever the solution is: there should at least be a prompt/s when running sudo apt-get upgrade
to install or not install that new version.
apt list --upgradable
list upgradable packages? – muru Jan 06 '21 at 03:02sudo apt-get --with-new-pkgs upgrade
did not solve the issue. I had to keep the title <150 chars: how can it be installed? (as in the text). @StephenKitt I updated the question after running these commands. – mYnDstrEAm Jan 06 '21 at 10:50