curl - 为 arm-linux-gnueabi 构建 libcurl:为什么 curl 忽略 openssl?
问题描述
1.构建openssl
git clone https://github.com/openssl/openssl.git -b OpenSSL_1_1_1-stable --depth 1 openssl-1.1.1
cd openssl-1.1.1
./Configure --prefix=/usr linux-generic32 shared \
--cross-compile-prefix=arm-linux-gnueabihf-
make depend -j7
make -j7
make DESTDIR=/Volumes/lpd-dev/armhf/ install_sw install_ssldirs
2.构建卷曲
git clone https://github.com/curl/curl.git -b curl-7_64_1 --depth 1 curl-7.64.1
cd curl-7.64.1
./buildconf
./configure --host=arm-linux-gnueabihf --prefix=/usr --with-ssl=/Volumes/lpd-dev/armhf/usr
这输出:
...
configure: PKG_CONFIG_LIBDIR will be set to "/Volumes/lpd-
dev/armhf/usr/lib/pkgconfig"
checking for arm-linux-gnueabihf-pkg-config... /usr/bin/pkg-config
checking for openssl options with pkg-config... found
configure: pkg-config: SSL_LIBS: "-lssl -lcrypto"
configure: pkg-config: SSL_LDFLAGS: ""
configure: pkg-config: SSL_CPPFLAGS: ""
checking for HMAC_Update in -lcrypto... no
checking for HMAC_Init_ex in -lcrypto... no
checking OpenSSL linking with -ldl... no
checking OpenSSL linking with -ldl and -lpthread... no
configure: WARNING: SSL disabled, you will not be able to use HTTPS, FTPS, NTLM and more.
configure: WARNING: Use --with-ssl, --with-gnutls, --with-polarssl, --with-cyassl, --with-nss, --with-schannel, --with-secure-transport, --with-mesalink or --with-amissl to address this.
...
找到 pkgconfig,但 WARNING: SSL disabled
解决方案
在写问题的过程中,我重新阅读了 more./configure
的输出并理解“/Volumes/lpd-dev/armhf/usr/lib/pkgconfig”指向--prefix=/usr
但由于我们是交叉编译指向错误的位置!
只需移动或删除.../armhf/usr/lib/pkgconfig
已解决的问题。
...
curl version: 7.64.1-DEV
SSL: enabled (OpenSSL)
SSH: no (--with-libssh2)
...
推荐阅读
- javascript - 如何使用 HTML 和 CSS 将 div 放在图像上?
- python - Keras:图层顺序的输入0与图层不兼容
- python - Pyinstaller EXE 只能从 CMD 运行,点击 EXE 不起作用
- sql - SQLite3 Order by highest/lowest numerical value
- javascript - 正确地将第二个动态模板添加到 Gatsby/NetlifyCMS - 我哪里出错了?
- java - 如何在部署环境中将 java 应用程序与 3rd 方库链接
- python - 如何解压缩压缩的 base64 字符串?
- f# - 如何在 Elmish 中同时应用硬编码类和方法类?
- docker - Docker - Psiturk 的端口转发不起作用
- python - 列表理解循环排序取决于嵌套