Installing Python-2.7 on Ubuntu 10.4

后端 未结 4 807
遥遥无期
遥遥无期 2020-12-01 16:46

I can\'t seem to install zlib properly, I installed Python from source on Ubuntu10.4

\'######## edit #####################
bobince and Luper helped.
Make s

相关标签:
4条回答
  • 2020-12-01 17:25

    Keep in mind that Ubuntu is using a directory called /lib/x86_64-linux-gnu for x64 architectures. If you are using that architecture you need to create a symbolic link:

    $ sudo ln -s /lib/x86_64-linux-gnu/libz.so.1 /lib/libz.so
    

    Also, you should do same thing for others shared libraries.

    0 讨论(0)
  • 2020-12-01 17:27

    Try to install dpkg-dev before configuring and compiling Python. This will install the dpkg-architecture executable on the system, which Python uses (see setup.py) to determine where the libz.so library is. For more details see http://fnch.users.sourceforge.net/pythononubuntu1004.html

    0 讨论(0)
  • 2020-12-01 17:41

    You don't want zlibc, it's something else completely. You want zlib1g (which will certainly be installed already) and, as Luper mentioned, the ‘development’ package which is zlib1g-dev.

    Debian-based Linux distros split each C library into a separate runtime binary package and a development package which delivers the headers for inclusion at compile time. If you want to compile something from source that relies on the library you need both packages. It's a bit of an annoyance, but probably inevitable given the staggeringly enormous number of libs the likes of Ubuntu deliver.

    Make sure you bring in other -dev packages you might want Python to be able to use, too, such as libexpat1-dev, libdb4.8-dev, libncurses5-dev and libreadline6-dev (using the Python interpreter without readline is painful!). You'll then have to recompile Python to take advantage of them.

    (Or if you can't be bothered, you might forget setuptools, and just unpack whatever end app it is yourself and drop it in the site-packages or wherever. Have to say I'm not a huge fan of eggs.)

    0 讨论(0)
  • 2020-12-01 17:41

    Make sure the dev package of zlib (and any other lib that a standard module you need depends on) is installed when configuring and compiling Python from source.

    0 讨论(0)
提交回复
热议问题