2012-07-16 35 views
1

我想創建一個包含使用pythonbrew自定義構建的python的debian包。是否可以重新定位pythonbrew

編譯和debian的構建是成功的。 問題是,當我在其他機器上安裝軟件包時,某些模塊無法正常工作。例如hashlib甚至os.getcwd()不起作用。而在構建機器上一切正常。

是否可以重新安置python安裝?可能是什麼問題?

>>> from hashlib import md5 
ERROR:root:code for hash md5 was not found. 
Traceback (most recent call last): 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module> 
    globals()[__func_name] = __get_hash(__func_name) 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor 
    raise ValueError('unsupported hash type %s' % name) 
ValueError: unsupported hash type md5 
ERROR:root:code for hash sha1 was not found. 
Traceback (most recent call last): 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module> 
    globals()[__func_name] = __get_hash(__func_name) 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor 
    raise ValueError('unsupported hash type %s' % name) 
ValueError: unsupported hash type sha1 
ERROR:root:code for hash sha224 was not found. 
Traceback (most recent call last): 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module> 
    globals()[__func_name] = __get_hash(__func_name) 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor 
    raise ValueError('unsupported hash type %s' % name) 
ValueError: unsupported hash type sha224 
ERROR:root:code for hash sha256 was not found. 
Traceback (most recent call last): 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module> 
    globals()[__func_name] = __get_hash(__func_name) 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor 
    raise ValueError('unsupported hash type %s' % name) 
ValueError: unsupported hash type sha256 
ERROR:root:code for hash sha384 was not found. 
Traceback (most recent call last): 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module> 
    globals()[__func_name] = __get_hash(__func_name) 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor 
    raise ValueError('unsupported hash type %s' % name) 
ValueError: unsupported hash type sha384 
ERROR:root:code for hash sha512 was not found. 
Traceback (most recent call last): 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 139, in <module> 
    globals()[__func_name] = __get_hash(__func_name) 
    File "/opt/sw-python/extra/pythonbrew/pythons/Python-2.7.2/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor 
    raise ValueError('unsupported hash type %s' % name) 
ValueError: unsupported hash type sha512 
Traceback (most recent call last): 
    File "<stdin>", line 1, in <module> 
ImportError: cannot import name md5 

我建立它在/opt/sw-python/extra/pythonbrew目錄上安裝pythonbrew被放置到同一個目錄/opt/sw-python/extra/pythonbrew

目標機:

Linux german-pc 3.0.0-12-generic ... x86_64 x86_64 x86_64 GNU/Linux 

構建機器:

Linux ds5vs5 2.6.32-5-amd64 ... 2012 x86_64 GNU/Linux 

回答

0

最後,我安裝了一個不同版本的Debian機器類似建機在我的Debian軟件包。它的工作!

我不知道究竟是什麼導致了這個問題,但我想這是內核或編譯器的差異。

相關問題