【发布时间】:2022-06-15 22:36:58
【问题描述】:
我刚刚更新到 Ubuntu 22.04 LTS,而我使用 OpenSSL 的库刚刚停止工作。 看起来 Ubuntu 切换到了 OpenSSL 3.0 版。
例如,诗歌停止工作:
Traceback (most recent call last):
File "/home/robz/.local/bin/poetry", line 5, in <module>
from poetry.console import main
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/__init__.py", line 1, in <module>
from .application import Application
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/application.py", line 7, in <module>
from .commands.about import AboutCommand
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/commands/__init__.py", line 4, in <module>
from .check import CheckCommand
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/console/commands/check.py", line 2, in <module>
from poetry.factory import Factory
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/factory.py", line 18, in <module>
from .repositories.pypi_repository import PyPiRepository
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/repositories/pypi_repository.py", line 33, in <module>
from ..inspection.info import PackageInfo
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/inspection/info.py", line 25, in <module>
from poetry.utils.env import EnvCommandError
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/poetry/utils/env.py", line 23, in <module>
import virtualenv
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/virtualenv/__init__.py", line 3, in <module>
from .run import cli_run, session_via_cli
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/virtualenv/run/__init__.py", line 11, in <module>
from ..seed.wheels.periodic_update import manual_upgrade
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/virtualenv/seed/wheels/__init__.py", line 3, in <module>
from .acquire import get_wheel, pip_wheel_env_run
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/virtualenv/seed/wheels/acquire.py", line 12, in <module>
from .bundle import from_bundle
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/virtualenv/seed/wheels/bundle.py", line 4, in <module>
from .periodic_update import periodic_update
File "/home/robz/.local/share/pypoetry/venv/lib/python3.9/site-packages/virtualenv/seed/wheels/periodic_update.py", line 10, in <module>
import ssl
File "/home/robz/.pyenv/versions/3.9.10/lib/python3.9/ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError: libssl.so.1.1: cannot open shared object file: No such file or directory
有简单的解决方法吗?例如,无需卸载 OpenSSL 3 就可以使用libssl.so.1.1(我什至不知道这是否可能)。
【问题讨论】:
-
我会考虑重新安装您的虚拟环境:
ssl模块需要使用更新的系统库重新构建。 -
这就是我所做的,就像一个魅力!
标签: python linux openssl python-poetry