kann ich nicht zlib richtig zu installieren, scheint, ich Python von der Quelle auf Ubuntu10.4 installiertInstallation von Python-2.7 auf Ubuntu 10.4
‚######## bearbeiten ####### ##############
Bobince und Luper geholfen.
Achten Sie darauf, diese Pakete installieren und dann Python neu kompilieren:
sudo aptitude zlib1g-dev libreadline6-dev libdb4.8-dev libncurses5-dev
‚installieren ############### ##################
nach der Installation habe ich versucht, setuptools.py
$ sh setuptools-0.6c11-py2.7.egg
Traceback (most recent call last):
File "<string>", line 1, in <module>
zipimport.ZipImportError: can't decompress data; zlib not available
ich dann installiert zlib zu installieren:
$ sudo aptitude install zlibc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
The following NEW packages will be installed:
zlibc
0 packages upgraded, 1 newly installed, 0 to remove and 44 not upgraded.
Need to get 74.6kB of archives. After unpacking 299kB will be used.
Writing extended state information... Done
Get:1 http://archive.ubuntu.com/ubuntu/ lucid/universe zlibc 0.9k-4.1 [74.6kB]
Fetched 74.6kB in 0s (108kB/s)
Selecting previously deselected package zlibc.
(Reading database ... 19824 files and directories currently installed.)
Unpacking zlibc (from .../zlibc_0.9k-4.1_amd64.deb) ...
Processing triggers for man-db ...
Setting up zlibc (0.9k-4.1) ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
B efore neu zu kompilieren Python:
aber Setuptools noch nicht installiert:
$ sh setuptools-0.6c11-py2.7.egg
Traceback (most recent call last):
File "<string>", line 1, in <module>
zipimport.ZipImportError: can't decompress data; zlib not available
Ich bin verwirrt.
ich meine Berechtigungen geprüft:
lrwxrwxrwx 1 root 18 Oct 28 18:19 /usr/bin/python -> /usr/bin/python2.7
lrwxrwxrwx 1 root 24 Oct 28 18:26 /usr/bin/python2.7 -> /usr/local/bin/python2.7
lrwxrwxrwx 1 root 9 Oct 28 15:13 /usr/bin/python2 -> python2.6
-rwxr-xr-x 1 root 2613296 Apr 16 2010 /usr/bin/python2.6
Ich bemerkte, hatte ich einen zusätzlichen Schritt hinzugefügt, so dass ich Refactoring es:
llrwxrwxrwx 1 root 24 Oct 28 18:33 /usr/bin/python -> /usr/local/bin/python2.7
lrwxrwxrwx 1 root 9 Oct 28 15:13 /usr/bin/python2 -> python2.6
-rwxr-xr-x 1 root 2613296 Apr 16 2010 /usr/bin/python2.6
So, jetzt sollte python2.7 die Standardversion sein, aber es schlägt immer noch fehl.
$ sh setuptools-0.6c11-py2.7.egg --prefix=/usr/local/bin/python2.7
Traceback (most recent call last):
File "<string>", line 1, in <module>
zipimport.ZipImportError: can't decompress data; zlib not available
Wo sollte zlib liegen, damit es richtig funktioniert?
$ find/-name zlib 2>/dev/null
/home/username/sources/Python-2.7/Modules/zlib
/home/username/sources/Python-2.7/Demo/zlib
[email protected] Thu Oct 28 18:43:17 ~/sources
$ find/-name zlibc 2>/dev/null
/usr/share/lintian/overrides/zlibc
/usr/share/doc/zlibc
Das war es, vielen Dank! – Fabian
das war es auch für mich. – fastmultiplication
Ja. Das ist es. Vielen Dank! – ssapkota