问题描述
所以。我正在尝试让我的Dockerfile运行。
Dockerfile很复杂,对于Python而言,这样做有些错误。不过,重要的部分是,在我将XMLSec添加到依赖项之前,它已经起作用了。 (通过onelogin [https://github.com/onelogin/python-saml]软件包)
在非Docker化系统上,我们运行:
apt install -y libxml2-dev libxmlsec1-dev libxmlsec1-openssl pkg-config
并安装依赖项。但是,我的容器化尝试遇到了这个问题:
Running setup.py install for xmlsec: started
Running setup.py install for xmlsec: finished with status 'error'
Complete output from command /usr/local/bin/python3.6 -u -c "import setuptools,tokenize;__file__='/tmp/pip-install-wd6h548m/xmlsec/setup.py';f=getattr(tokenize,'open',open)(__file__);code=f.read().replace('\r\n','\n');f.close();exec(compile(code,__file__,'exec'))" install --record /tmp/pip-record-ufxw9hor/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
creating build
creating build/lib.linux-x86_64-3.6
creating build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/py.typed -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/constants.pyi -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/template.pyi -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/__init__.pyi -> build/lib.linux-x86_64-3.6/xmlsec
copying src/xmlsec/tree.pyi -> build/lib.linux-x86_64-3.6/xmlsec
running build_ext
error: Unable to invoke pkg-config.
解决方案似乎是使用XMLSec库作为已编译的Wheel。 (根据我在XMLSec github中阅读的内容),我找不到任何有关如何通过Dockerfile将已编译的转轮添加到容器内可执行位置的文档。
我对此进行了大量研究,找不到示例代码或确切答案。我可能很明显,但是我缺少核心知识。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)