저는 Debian10/KDE를 사용하고 있으며 몇 달 전의 패키지를 보관하고 있습니다. 그러나 sudo apt update
대신 사용하면 sudo apt-get update
추가 콘텐츠가 표시되고 "추가 버전"을 볼 수 있습니다.
왜 그런 겁니까? 이것도 apt-get에도 표시되어야 하지 않나요? 단순히 버전 2.8.5를 설치하면 안 되나요? (왜 안돼? 설치 방법?)
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]
추가 디버깅을 시도해 보세요.
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.
연결된 질문과 달리 일반적인 질문은 sudo apt-get --with-new-pkgs upgrade
여기서 작동하지 않습니다.
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.
sudo apt-get upgrade
해결책이 무엇이든, 새 버전을 설치하거나 설치하지 않으려면 실행할 때 최소한 프롬프트가 표시되어야 합니다 .
답변1
Postgresql 저장소의 stretch
코드명을 다음으로 변경합니다 buster
.
sudo sed -i 's/stretch/buster/' /etc/apt/sources.list.d/pgdg.list
그런 다음 다음을 실행하십시오.
sudo apt update
sudo apt upgrade
python3-psycopg2/stretch-pgdg 2.8.5-1~pgdg90+1 amd64 [업그레이드 가능: 2.7.7-1]
debian 저장소에서 제공하는 설치 버전을 postgresql 저장소에서 제공하는 버전 python3-psycopg2
으로 업그레이드해야 합니다 . 하지만 업그레이드하기 전에 현재 설정된 2.8.5-1~pgdg90+1
저장소 대신 debian Buster를 가리키는 올바른 저장소를 설정해야 합니다 .Stretch