Redhat | 如何为64位编译Python 2.6
我正在尝试为64位系统编译Python 2.6,我试过各种编译命令,但不确定这些命令是否正确。
./configure --with-universal-archs=32-bit --prefix="$HOME/python"
make
make install
正确的语法是什么呢 ... ?
1 个回答
1
具体是哪里不工作呢?你有没有看到什么错误信息?
先试着简单编译一下,不要先安装:
$ cd path/to/python/source
$ ./configure
$ make all
... wait for some time ...
$ make test # this runs python's test suite, you can usually skip this
$ ./python # note the ./ runs the just installed python instead of system's python
$ # note: do not run make install yet, or you will override system's python, see below
另外,确保你已经安装了make工具(可以是GNU Make或者其他的)。
你是从哪里获取源代码的?如果你是直接从代码库下载的,有可能源代码有问题,或者你可能需要重新运行autotool。
在确认编译确实能正常工作后,你可以:
$ cd path/to/python/source/
$ ./configure --prefix=/where/you/want/to/install/it
$ make all
... wait for some time ...
$ make test # this runs python's test suite, you can usually skip this
$ make install