AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-39087

optilude's questions

Martin Hope
optilude
Asked: 2010-03-30 01:24:12 +0800 CST

使用系统范围的库在 SuSE (SLES) 11 上安装干净的 Python 2.6

  • 1

我花了一天的大部分时间在这上面,这让我非常疯狂。在我使用过的所有其他 Unix 上,这是在公园里散步,但 SLES 11 让我目瞪口呆。

我需要在 SLES 11 64 位上构建 Zope:

Linux <name> 2.6.27.45-0.1-default #1 SMP 2010-02-22 16:49:47 +0100 x86_64 x86_64 x86_64 GNU/Linux

我首先尝试只使用安装了 YaST 的 Python 2.6。我还安装了 python-devel、libjpeg-devel、readline-devel、libopenssl-devel、libz2-devel、zlib-devel 和 libgcrypt-devel。

全局python2.6里面有很多杂物,当我使用它时似乎在/etc/pythonstart中执行了一些东西,这没有帮助。但是,我得到的错误是:

Getting distribution for 'Zope2==2.12.3'.
src/AccessControl/cAccessControl.c:596: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:598: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:598: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:599: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:599: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:600: warning: ‘intintargfunc’ is deprecated
src/AccessControl/cAccessControl.c:600: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:601: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:602: warning: initialization from incompatible pointer type
src/AccessControl/cAccessControl.c:606: warning: ‘intargfunc’ is deprecated
src/AccessControl/cAccessControl.c:606: warning: initialization from incompatible pointer type
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /usr/lib/libpython2.6.so when searching for -lpython2.6
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.6
collect2: ld returned 1 exit status
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occured when trying to install Zope2 2.12.3. Look above this message for any errors that were output by easy_install.

我不知道这里的“不兼容”指的是什么;我的猜测是硬件架构,但我不确定什么与上面的陈述不兼容。

我以前在系统安装的 Python 上遇到过问题,所以我尝试编译自己的(因此是上面的 -devel 包列表),下载 Python 2.6 tarball 并运行:

./configure --disable-tk --prefix=${HOME}/python
make
make install

这会安装,但似乎无法找到任何系统范围的库。这是一个示例解释器会话:

Python 2.6.5 (r265:79063, Mar 29 2010, 17:04:12) 
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Traceback (most recent call last):
  File "/etc/pythonstart", line 7, in <module>
    import readline
ImportError: No module named readline
>>> from hashlib import md5
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/osc/python-2.6/lib/python2.6/hashlib.py", line 136, in <module>
    md5 = __get_builtin_constructor('md5')
  File "/home/osc/python-2.6/lib/python2.6/hashlib.py", line 63, in __get_builtin_constructor
    import _md5
ImportError: No module named _md5

应该安装 readline 和 hashlib(通过 libgrypt),并且还安装了相关的 -devel 包。在 Ubuntu 或 OS X 上,这工作得很好。在 SuSE 上,没有运气。

非常感谢任何帮助!

马丁

python 64-bit architecture sles11
  • 4 个回答
  • 9004 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve