无论我尝试什么,我都做不到。 我在Centos 5.6 x86_64上
1 python setup.py bdist_rmp给我的语法错误:
[root@localhost Python-2.7.3]# python setup.py bdist_rpm File "setup.py", line 361 with open(tmpfile) as fp:
2 checkinstall python setup.py install输出与上面相同的语法错误。
3 checkinstall make install并且在标准输出中有很多ignoring ...语句,最终的RPM没有大部分文件。
4使用这个shell脚本我可以安装python并用python setup.py bdist_rpm方法构buildRPM包,但是python 2.7包需要python 2.7,因为它是依赖的。
编辑 :其实,不,#4也不工作。
我厌倦了不同的./configure --prefix值,没有任何区别。
我已经阅读了很多如何在Centos上安装python的选项,但99%的build议使用纯粹的“make install”,这是我需要避免的。
提前致谢。
我能用这个命令打包它:
checkinstall --fstrans=no --install=no --pkgname=python --pkgversion "2.7.3" --default
但是,当我试图用rpm -i安装它时,我得到了这个:
error: Failed dependencies: libtcl8.4.so()(64bit) is needed by python-2.7.3-1.x86_64 libtk8.4.so()(64bit) is needed by python-2.7.3-1.x86_64 python < 2.4.3-32.el5 conflicts with python-libs-2.4.3-44.el5.x86_64
缺失的依赖是可以理解的,但是很明显,有什么矛盾和如何解决。
而不是混淆你的本地系统包,试图build立这个,我build议你看看使用Fedora的模拟 。 关于你遇到的冲突,看看使用Python 2.4的需求:
rpm -qR python (and the version if it is not the system release)
Python 2.4可能只需要较旧版本的python-libs。