- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
直到最近,我一直在 python:3.6.6-jessie
docker 镜像中使用 openssl
库,并且事情按预期工作。
我使用非常基本的 Dockerfile
配置来安装所有必要的依赖项:
FROM python:3.6.6-jessie
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
WORKDIR /code
RUN apt-get -qq update
RUN apt-get install openssl
RUN apt-get upgrade -y openssl
ADD requirements.txt /code/
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
并使用以下两行访问并初始化库本身:
openssl = cdll.LoadLibrary("libssl.so")
openssl.SSL_library_init()
这种方法效果很好。
<小时/>本周我正在升级 python 和库,因此我切换到更新的 docker 镜像:
FROM python:3.7.5
...
这立即导致 openssl
由于此异常而停止工作:
AttributeError: /usr/lib/x86_64-linux-gnu/libssl.so.1.1: undefined symbol: SSL_library_init
从这个错误中我可以了解到libssl
不再提供SSL_library_init
方法(或者看起来是这样),这是一个相当奇怪的问题,因为中的初始化程序名称>openssl
文档是相同的。
我还尝试使用 -stretch
和 -buster
发行版解决此问题,但问题仍然存在。
在这些较新的发行版中运行 SSL_library_init
的正确方法是什么?也许需要一些额外的 dockerfile 配置?
最佳答案
我认为你需要安装libssl1.0-dev
RUN apt-get install -y libssl1.0-dev
关于python - 如何从 Python 3.7 docker 镜像运行 SSL_library_init(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58563651/
在我的代码中,SSL 库函数 SSL_library_init() 没有按预期返回 1。我如何才能看到它返回了什么错误? 我在 SSL_library_init() 之后调用了 SSL_load_er
我正在使用 openssl 库打开到某个服务器的 TLS 连接。阅读库文档(是的,有些人仍在阅读文档和手册页)我偶然发现了句子“SSL_libary_init() is not reentrant”。
最近我开始研究 C++ 中的内存泄漏,所以我可能会问一个幼稚的问题。 我有一个使用 OpenSSL 的 c++ 库——我的任务是检查这个库中是否存在内存泄漏。我已经运行 Visual Leak Det
尝试使用 gdb 调试程序时,它在 OPENSSL_cpuid_setup 中报告 SIGILL 失败。 使用这个简单的代码,我有相同的行为: #include int main() { S
直到最近,我一直在 python:3.6.6-jessie docker 镜像中使用 openssl 库,并且事情按预期工作。 我使用非常基本的 Dockerfile 配置来安装所有必要的依赖项: F
我正在实现 OpenSSL 代码并且已经包含了所需的头文件,但我仍然收到类似 * 的错误 undefined reference to SSL_library_init 我猜这是链接错误而不是编译错误
** *File "/usr/local/lib/python3.7/site-packages/P4.py", line 410, in import P4API ImportErro
我是一名优秀的程序员,十分优秀!