
Ubuntu 11.10은 라이센스 철학으로 인해 python-profiler를 Python 표준 라이브러리에서 분리했습니다. (제가 구글링한 내용에 따르면 제가 틀렸다면 바로잡아주세요.)
이것은 11.10에서 10월부터 활성화된 버그입니다. Python 2.7.2가 설치되어 있으므로 종속성 오류가 잘못되었습니다. 'apt-get check'로는 문제가 해결되지 않습니다.
이 문제를 해결하는 가장 좋은 방법은 무엇입니까? 감사합니다.
sudo apt-get install python-profiler
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:
python-profiler : Depends: python (>= 2.5) but it is not going to be installed
Depends: python (< 2.8) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
답변1
패키지 python-profile
에는 몇 가지 .py
파일만 포함되어 있습니다.
$ apt-file list python-profiler
python-profiler: /usr/lib/python2.5/profile.py
python-profiler: /usr/lib/python2.5/pstats.py
python-profiler: /usr/lib/python2.6/profile.py
python-profiler: /usr/lib/python2.6/pstats.py
python-profiler: /usr/lib/python2.7/profile.py
python-profiler: /usr/lib/python2.7/pstats.py
python-profiler: /usr/share/doc/python-profiler/README.Debian
python-profiler: /usr/share/doc/python-profiler/changelog.Debian.gz
python-profiler: /usr/share/doc/python-profiler/copyright
python-profiler: /usr/share/lintian/overrides/python-profiler
따라서 를 사용하여 바이너리 패키지를 다운로드 apt-get download python-profiler
하고 dpkg -x python-profiler_<version>_all.deb <dir>
. 패키지의 내용이 있으면 파일을 .py
해당 위치에 복사하여 Python 설치에서 프로파일러 모듈을 사용할 수 있도록 할 수 있습니다.