Wie zwinge ich apt-get, ein Paket zu installieren, das sich aufgrund eines Fehlers in Ubuntu 11.10 nicht installieren lässt?

Wie zwinge ich apt-get, ein Paket zu installieren, das sich aufgrund eines Fehlers in Ubuntu 11.10 nicht installieren lässt?

Ubuntu 11.10 hat den Python-Profiler aus Lizenzierungsgründen aus der Python-Standardbibliothek herausgelöst. (Soweit ich es googeln konnte, korrigieren Sie mich, wenn ich falsch liege.)

Dies ist seit Oktober ein aktiver Fehler für 11.10. Ich habe Python 2.7.2 installiert, daher sind die Abhängigkeitsfehler falsch. „apt-get check“ löst das Problem nicht.

Wie lässt sich dieses Problem am besten lösen? Danke.

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.

Antwort1

Das python-profilePaket enthält nur einige .pyDateien:

$ 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

Daher können Sie das Binärpaket mit herunterladen apt-get download python-profilerund seinen Inhalt mit extrahieren dpkg -x python-profiler_<version>_all.deb <dir>. Sobald Sie den Inhalt des Pakets haben, können Sie die .pyDateien einfach an ihren Speicherort kopieren, um die Profilermodule in Ihrer Python-Installation verfügbar zu machen.

verwandte Informationen