安装python的时候遇到的问题,没法安装bz2modules等

使用官网的源码包下载的python:
http://www.python.org/getit/
解压以后,进行安装操做:
./configure
make
make报错信息:
Python build finished, but the necessary bits to build these modules were not found:
_bz2               _curses            _curses_panel  
_dbm               _gdbm              _lzma          
_sqlite3           _tkinter           readline 

此类问题是因为缺乏一些devel包形成的,以bz2为例:
yum install bzip2-devel
安装完成以后,从新make即可
能够对生成的python文件进行测试:
./python -c "import bz2; print bz2.__doc__"
输出信息以下:
The python bz2 module provides a comprehensive interface for
the bz2 compression library. It implements a complete file
interface, one shot (de)compression functions, and types for
sequential (de)compression.
即可肯定该包成功安装。其余须要的包都是相似的readline-devel,openssl-devel等等 python

相关文章
相关标签/搜索