Python 3.8을 설치한 후 pip3에 몇 가지 문제가 발생했습니다. 깨진 Anaconda와의 일부 충돌로 인해 Anaconda를 다시 설치하고 문제를 해결했습니다. 하지만 지금은 apt-get
깨진 것 같고 몇 가지 문제가 있습니다 apt-listchanges
.
eric@debian:~$ sudo apt-get install liblzma-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
liblzma-dev is already the newest version (5.2.2-1.2+b1).
0 upgraded, 0 newly installed, 0 to remove and 118 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up apt-listchanges (3.10) ...
Deferring configuration of apt-listchanges until python3 is available
/var/lib/dpkg/info/apt-listchanges.postinst: 161: /var/lib/dpkg/info/apt-listchanges.postinst: python3: not found
dpkg: error processing package apt-listchanges (--configure):
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
apt-listchanges
E: Sub-process /usr/bin/dpkg returned an error code (1)
재설치를 시도했지만 실패했습니다.
eric@debian:~$ sudo dpkg --purge apt-listchanges
(Reading database ... 305278 files and directories currently installed.)
Removing apt-listchanges (3.10) ...
/var/lib/dpkg/info/apt-listchanges.prerm: 6: /var/lib/dpkg/info/apt-listchanges.prerm: py3clean: not found
dpkg: error processing package apt-listchanges (--purge):
subprocess installed pre-removal script returned error exit status 127
Deferring configuration of apt-listchanges until python3 is available
/var/lib/dpkg/info/apt-listchanges.postinst: 186: /var/lib/dpkg/info/apt-listchanges.postinst: py3compile: not found
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 127
Errors were encountered while processing:
apt-listchanges
나도 비슷한 오류가 발생했습니다 sudo apt install apt-listchanges
. apt 또는 apt-get을 사용할 수 없으며 실패합니다. 덧붙여서:
eric@debian:/usr/bin$ which python
/usr/bin/python
eric@debian:/usr/bin$ python --version
Python 2.7.13
eric@debian:/usr/bin$ which python3
eric@debian:/usr/bin$ which python3.8
/usr/local/bin/python3.8
eric@debian:/usr/bin$ python3.8 --version
Python 3.8.3
(관련 질문에서 많은 답변을 시도했지만 가독성을 위해 질문을 요약하는 것을 선호합니다. 내 질문이 Python 설치만큼 복잡해지는 것을 원하지 않습니다)
미리 감사드립니다!
(시스템: Debian Stretch w/KDE Plasma. I7 8500U 16Gb)
편집: python3 심볼릭 링크가 없습니다. Python 2.7에서는 모든 것이 정상입니다.
eric@debian:~$ ls -l $(which python)
lrwxrwxrwx 1 root root 9 Jan 24 2017 /usr/bin/python -> python2.7
하지만 python3의 경우:
eric@debian:~$ ls -l $(which python3)
total 1508792
-rw-r--r-- 1 eric eric 8358 Oct 4 2019 041019
-rw-r--r-- 1 eric eric 26411849 Aug 12 2018 95681f94e7e4471b583d11b0c4cab198
drwxr-xr-x 26 eric eric 4096 May 18 22:33 anaconda3
drwxr-xr-x 11 eric eric 4096 Mar 3 01:34 Arduino
-rw-r--r-- 1 eric eric 2729653 May 13 2019 c17_hill.pdf
-rw-r--r-- 1 eric eric 1252901 Apr 8 2018 chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb
-rw-r--r-- 1 eric eric 5187109 Apr 8 2018 chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb.1
-rw-r--r-- 1 eric eric 34341 Apr 8 2018 chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb.2
-rw-r--r-- 1 eric eric 58968590 May 25 2017 chromium-browser_56.0.2924.84-0ubuntu0.14.04.1.1011.deb.3
-rw-r--r-- 1 eric eric 1231294 Jul 22 2019 default22.pdf
-rw-r--r-- 1 eric eric 1694387 Feb 13 2019 default.pdf
drwxr-xrwx 2 eric eric 4096 Jul 30 15:31 Desktop
drwxr-xrwx 109 eric eric 20480 Jul 30 15:17 Documents
drwxr-xrwx 7 eric eric 20480 Jul 30 20:06 Downloads
drwxr-xrwx 22 eric eric 4096 Jul 29 11:40 Dropbox
-rw-r--r-- 1 eric eric 2422 Apr 13 2018 equivs-dummy_1.0_all.deb
-rw-r--r-- 1 eric eric 141149 Feb 24 14:25 Figure_2.png
-rw-r--r-- 1 eric eric 1662625 Mar 27 2019 ganancias19.pdf
drwxr-xr-x 16 eric eric 4096 Feb 23 2018 hdf5-1.10.1
-rw-r--r-- 1 eric eric 15052127 Apr 27 2017 hdf5-1.10.1.tar.gz
-rw-r--r-- 1 eric eric 1508692 Jun 18 2018 IC-215-780-User-and-Operation-Manual-Manual.pdf
drwxr-xr-x 2 eric eric 4096 Sep 21 2019 King Crimson - Beat (40th Anniversary Series)
drwxr-xr-x 2 eric eric 4096 Sep 21 2019 King Crimson - Discipline - 2011 [flac]
drwxr-xr-x 2 eric eric 4096 Sep 7 2019 King Crimson {Three Of A Perfect Pair}
-rw-r--r-- 1 root root 0 Feb 28 2019 minicom.cap
-rw-r--r-- 1 eric eric 4592839 May 14 2019 muscle_hill.pdf
drwxr-xrwx 127 eric eric 4096 Sep 6 2019 Music
drwxr-xr-x 22 eric eric 4096 Feb 23 2018 netcdf-4.3.3
-rw-r--r-- 1 eric eric 1357215611 Apr 4 2018 NOOBS_v2_7_0.zip
-rw-r--r-- 1 eric eric 758 Dec 11 2019 nuevo13.kmz
drwxr-xr-x 3 eric eric 4096 Feb 23 2018 OceanColorProject
drwxr-xrwx 153 eric eric 20480 Jul 7 18:11 Pictures
drwxr-xrwx 2 eric eric 4096 Dec 28 2017 Public
-rw-r--r-- 1 root root 15229 Mar 1 2019 putty.log
drwxr-xr-x 18 eric eric 4096 May 15 22:10 Python-3.8.3
-rw-r--r-- 1 eric eric 17912964 May 13 18:48 Python-3.8.3.tar.xz
-rw-r--r-- 1 root root 1475 Apr 13 2018 python-pypdf
drwxr-xr-x 9 eric eric 4096 Feb 23 2018 seadas-7.4
-rw-r--r-- 1 root root 2340303 Apr 14 2018 status.bckup
-rw-r--r-- 1 root root 46846864 Dec 6 2017 teamviewer_i386.deb
drwxr-xrwx 2 eric eric 4096 Dec 28 2017 Templates
drwxr-xr-x 2 eric eric 4096 May 18 20:06 tmp
drwxr-xrwx 35 eric eric 4096 Jun 5 12:42 Videos
eric@debian:~$ ls -l $(which python3.8)
-rwxr-xr-x 1 root staff 17303968 May 15 22:11 /usr/local/bin/python3.8
이것이 중요한지는 모르겠지만 도움이 될 수 있습니다.
答え1
수많은 시도 끝에 마침내 나를 미치게 만들었던 문제를 해결했습니다. Python 3 설치의 명백한 오류로 인해 발생했기 때문에 다시 설치를 시도했지만 apt-get 오류 또는 손상된 Python 패키지로 인해 그렇게 할 수 없었습니다. 나는 a의 단계를 따랐다.우편 엽서그리고 관련된질문그러나 오류 수가 감소했음에도 불구하고 python3 설치가 다시 실패했습니다.
dpkg: error processing package python3-software-properties (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of software-properties-common:
software-properties-common depends on python3-software-properties (= 0.96.20.2-1); however:
Package python3-software-properties is not configured yet.
dpkg: error processing package software-properties-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-kde:
software-properties-kde depends on python3-software-properties (= 0.96.20.2-1); however:
Package python3-software-properties is not configured yet.
software-properties-kde depends on software-properties-common; however:
Package software-properties-common is not configured yet.
dpkg: error processing package software-properties-kde (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python3-software-properties
software-properties-common
software-properties-kde
E: Sub-process /usr/bin/dpkg returned an error code (1)
그래서 python3-software-properties를 다시 설치했습니다.
sudo apt-get --reinstall install python3-software-properties
그 다음에:
sudo dpkg -C
더 이상 오류가 발생하지 않습니다. 모든 것이 잘 작동하는 것 같습니다.