0
我要報告一個相當複雜的問題。SSL v2未定義符號,Manjaro和Ubuntu
我想開發一個跨平臺的python軟件。我在Manjaro Linux上,這是一個基於Arch-linux的發行版。
該軟件與cx_freeze一起打包,以方便其分發。所有必需的庫都捆綁在軟件包中,用戶只需執行一個二進制文件即可啓動該程序。在曼佳羅,二進制運行良好。
然而,當我嘗試在Ubuntu上,我遇到一個奇怪的問題:
Traceback (most recent call last):
File "/usr/lib/python3.5/site-packages/cx_Freeze/initscripts/Console.py", line 27, in <module>
File "/tmp/tmpinkmyph0/scripts/gui.py", line 39, in <module>
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 969, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 958, in _find_and_load_unlocked
module = _load_unlocked(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 664, in _load_unlocked
return _load_backward_compatible(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 634, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/home/djipey/informatique/python/ChemBrows/my_twit.py", line 13, in <module>
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 969, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 944, in _find_and_load_unlocked
_call_with_frames_removed(import_, parent)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 222, in _call_with_frames_removed
return f(*args, **kwds)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 969, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 958, in _find_and_load_unlocked
module = _load_unlocked(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 664, in _load_unlocked
return _load_backward_compatible(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 634, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/usr/lib/python3.5/site-packages/twitter/__init__.py", line 19, in <module>
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 969, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 958, in _find_and_load_unlocked
module = _load_unlocked(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 664, in _load_unlocked
return _load_backward_compatible(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 634, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/usr/lib/python3.5/site-packages/twitter/stream.py", line 13, in <module>
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 969, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 958, in _find_and_load_unlocked
module = _load_unlocked(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 664, in _load_unlocked
return _load_backward_compatible(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 634, in _load_backward_compatible
spec.loader.load_module(spec.name)
File "/usr/lib/python3.5/ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 969, in _find_and_load
return _find_and_load_unlocked(name, import_)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 958, in _find_and_load_unlocked
module = _load_unlocked(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 666, in _load_unlocked
module = module_from_spec(spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 577, in module_from_spec
module = spec.loader.create_module(spec)
File "/usr/lib/python3.5/importlib/_bootstrap_external.py", line 903, in create_module
_imp.create_dynamic, spec)
File "/usr/lib/python3.5/importlib/_bootstrap.py", line 222, in _call_with_frames_removed
return f(*args, **kwds)
ImportError: /home/ubuntu/Desktop/ChemBrows-0.9.6.linux-x86_64/ChemBrows-0.9.6.linux-x86_64/_ssl.cpython-35m-x86_64-linux-gnu.so: undefined symbol: SSLv2_method
有點挖後,似乎OpenSSL是沒有內置的支持2.0版本,在Ubuntu。我不明白的是程序崩潰的原因:由於所有的庫都與我的程序一起打包並交付,因此它不應該調用任何系統庫。
總之,我不明白爲什麼我的程序崩潰。任何幫助將不勝感激。
編輯:
在Ubuntu功能的版本2安裝OpenSSL時後,它完美的作品。但是這個程序很長很難,我不能要求我的未來用戶這樣做。所以,我應該構建Python 3不支持SSL V2的
「...因爲所有的庫都打包並與我的程序一起交付,它不應該調用任何系統庫......」 - 你確定像libc,libssl等操作系統庫真的包含在你發貨,即不僅是python庫?這將是非常罕見的。 –
你說得對,他們不是,因爲修補openssl解決了我的問題。我仍然在爲我的用戶尋求更簡單的解決方案。 – Rififi