Xubuntu 22.04에 PyRenamer.deb를 설치하려고 합니다.https://launchpad.net/pyrenamer
Pyrenamer는 Python2로 작성되었으며 내가 다운로드하고 수집한 여러 .deb 패키지 종속성이 있습니다.
Python2가 설치되어 있고 Python Alternatives가 올바르게 설정되어 있으므로 다음과 같습니다.
$ python -V
Python 2.7.18
$ python2 -V
Python 2.7.18
$ python3 -V
Python 3.10.4
따라서 종속성 .deb 패키지 중 하나를 설치하려고 하면 다음과 같습니다.
$ sudo dpkg -i python-gobject-2_2.28.6-12ubuntu3_amd64.deb
다음 오류 메시지가 나타납니다.
dpkg: dependency problems prevent configuration of python-gobject-2:
python-gobject-2 depends on python (<< 2.8); however:
Package python is not installed.
python-gobject-2 depends on python (>= 2.7~); however:
Package python is not installed.
Python 2.7.18이 설치되어 있고 Python 런타임이 올바르게 설정된 경우 이 오류 메시지가 표시되는 이유는 무엇입니까? 온라인에서 도움을 얻기 위해 노력하고 검색했지만 이 문제에 대한 해결책을 찾을 수 없습니다.
$ dpkg -l '*python*'
||/ Name Version Architecture Description
+++-=============================-========================-============-================================================================================
ii hexchat-python3:amd64 2.16.0-4build1 amd64 Python 3 plugin for HexChat
ii libpython-all-dbg:amd64 2.7.18-3 amd64 package depending on all supported Python2 debugging packages
ii libpython-all-dev:amd64 2.7.18-3 amd64 package depending on all supported Python2 development packages
un libpython-dbg <none> <none> (no description available)
un libpython-dev <none> <none> (no description available)
un libpython-stdlib <none> <none> (no description available)
ii libpython2-dbg:amd64 2.7.18-3 amd64 debug build of the Python2 interpreter (version 2.7)
ii libpython2-dev:amd64 2.7.18-3 amd64 header files and a static library for Python2
ii libpython2-stdlib:amd64 2.7.18-3 amd64 interactive high-level object-oriented language (Python2)
ii libpython2.7:amd64 2.7.18-13ubuntu1 amd64 Shared Python runtime library (version 2.7)
ii libpython2.7-dbg:amd64 2.7.18-13ubuntu1 amd64 Debug Build of the Python Interpreter (version 2.7)
ii libpython2.7-dev:amd64 2.7.18-13ubuntu1 amd64 Header files and a static library for Python (v2.7)
ii libpython2.7-minimal:amd64 2.7.18-13ubuntu1 amd64 Minimal subset of the Python language (version 2.7)
ii libpython2.7-stdlib:amd64 2.7.18-13ubuntu1 amd64 Interactive high-level object-oriented language (standard library, version 2.7)
ii libpython2.7-testsuite 2.7.18-13ubuntu1 all Testsuite for the Python standard library (v2.7)
ii libpython3-stdlib:amd64 3.10.4-0ubuntu2 amd64 interactive high-level object-oriented language (default python3 version)
ii libpython3.10:amd64 3.10.4-3 amd64 Shared Python runtime library (version 3.10)
ii libpython3.10-minimal:amd64 3.10.4-3 amd64 Minimal subset of the Python language (version 3.10)
ii libpython3.10-stdlib:amd64 3.10.4-3 amd64 Interactive high-level object-oriented language (standard library, version 3.10)
un libpython3.4-minimal <none> <none> (no description available)
un libpython3.5-minimal <none> <none> (no description available)
un libpython3.8-stdlib <none> <none> (no description available)
un python <none> <none> (no description available)
un python-4suite <none> <none> (no description available)
ii python-all 2.7.18-3 amd64 package depending on all supported Python2 runtime versions
ii python-all-dbg 2.7.18-3 amd64 package depending on all supported Python2 debugging packages
ii python-all-dev 2.7.18-3 amd64 package depending on all supported Python2 development packages
un python-apport
나는 이 페이지의 지침을 따랐습니다.
https://linuxconfig.org/install-python-2-on-ubuntu-20-04-focus-fossa-linux
Python2를 설치하려면 다음을 사용하십시오.
$ sudo apt update
$ sudo apt install python2
나는 이 페이지의 지침을 따랐습니다.
https://linuxconfig.org/ubuntu-20-04-python-version-switch-manager
Python 설정의 대안:
$ sudo update-alternatives --config python
There are 2 choices for the alternative python (providing /usr/bin/python).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/python3 2 auto mode
1 /usr/bin/python2 1 manual mode
2 /usr/bin/python3 2 manual mode
Press to keep the current choice[*], or type selection number: 1