在Openwrt中添加python3 package时出现错误:
Package python3-light is missing dependencies for the following libraries:
libcrypto.so.1.0.0libssl.so.1.0.0
分析:
Makefile:
define Package/python3-base
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) interpreter
DEPENDS:=+libpthread +zlib
endef
define Package/python3-light
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) light installation
DEPENDS:=+python3-base +libffi +libbz2 +libncurses +libpanel
endef
该Makefile中并没有显式依赖这两个库(libssl/libcrypto),为什么make时会提示这个依赖?看来是其代码中有依赖加密库的代码。
而linux中加密库不使用libssl库,而是使用libopenssl库。
解决方案:
需要显式指定对libopenssl库的依赖了:
define Package/python3-base
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) interpreter
DEPENDS:=+libpthread +zlib<span style="color:#ff0000;"> +libopenssl </span>
endef
define Package/python3-light
$(call Package/python3/Default)
TITLE:=Python $(PYTHON_VERSION) light installation
DEPENDS:=+python3-base +libffi +libbz2 +libcrypto +libncurses +libpanel
endef