我刚从http://www.openssl.org/source/下载并安装了OpenSSL [http://www.openssl.org/source/openssl-1.0.1c.tar.gz]
./config
make
make test
make install
现在我下载了CURL - http://curl.haxx.se/download/curl-7.27.0.tar.gz。尝试使用openssl配置curl会给出以下错误 -
.............................................................
checking for ssl with RSAglue/rsaref libs in use... checking for SSL_connect in -lssl... (cached) no
no
configure: error: OpenSSL libs and/or directories were not found where specified!
[root@curl-7.27.0]# ls -l /usr/local/ssl
total 40
drwxr-xr-x 2 root root 4096 Sep 28 01:21 bin
drwxr-xr-x 2 root root 4096 Sep 28 01:21 certs
drwxr-xr-x 3 root root 4096 Sep 28 01:21 include
drwxr-xr-x 4 root root 4096 Sep 28 01:21 lib
drwxr-xr-x 6 root root 4096 Sep 28 01:21 man
drwxr-xr-x 2 root root 4096 Sep 28 01:21 misc
-rw-r--r-- 1 root root 10835 Sep 28 01:21 openssl.cnf
drwxr-xr-x 2 root root 4096 Sep 28 01:21 private
[root@curl-7.27.0]#
我不确定如何修复此错误?
答案 0 :(得分:7)
配置libcurl
时尝试此操作./configure --with-ssl --with-libssl-prefix=/usr/local/ssl
/usr/local/ssl
是openssl包含头文件和库
/usr/local/ssl/
├── bin
├── certs
├── include
├── lib
├── man
├── misc
├── openssl.cnf
└── private
答案 1 :(得分:1)
如果您使用的是RHEL,并希望使用静态链接库(独立二进制文件)构建curl(例如v7.45),您还可以:
yum install openssl-devel # for headers and libraries
# run `./buildconf` if you cloned curl git repo
./configure --with-ssl=/usr/include/openssl --disable-shared
make
您的二进制文件将在./src/curl
生成。
openssl-devel
版本1.0.1e安装:
/usr/include/openssl
/usr/include/openssl/aes.h
/usr/include/openssl/asn1.h
/usr/include/openssl/asn1_mac.h
/usr/include/openssl/asn1t.h
/usr/include/openssl/bio.h
/usr/include/openssl/blowfish.h
/usr/include/openssl/bn.h
/usr/include/openssl/buffer.h
/usr/include/openssl/camellia.h
/usr/include/openssl/cast.h
/usr/include/openssl/cmac.h
/usr/include/openssl/cms.h
/usr/include/openssl/comp.h
/usr/include/openssl/conf.h
/usr/include/openssl/conf_api.h
/usr/include/openssl/crypto.h
/usr/include/openssl/des.h
/usr/include/openssl/des_old.h
/usr/include/openssl/dh.h
/usr/include/openssl/dsa.h
/usr/include/openssl/dso.h
/usr/include/openssl/dtls1.h
/usr/include/openssl/e_os2.h
/usr/include/openssl/ebcdic.h
/usr/include/openssl/ec.h
/usr/include/openssl/ecdh.h
/usr/include/openssl/ecdsa.h
/usr/include/openssl/engine.h
/usr/include/openssl/err.h
/usr/include/openssl/evp.h
/usr/include/openssl/fips.h
/usr/include/openssl/fips_rand.h
/usr/include/openssl/hmac.h
/usr/include/openssl/idea.h
/usr/include/openssl/krb5_asn.h
/usr/include/openssl/kssl.h
/usr/include/openssl/lhash.h
/usr/include/openssl/md2.h
/usr/include/openssl/md4.h
/usr/include/openssl/md5.h
/usr/include/openssl/modes.h
/usr/include/openssl/obj_mac.h
/usr/include/openssl/objects.h
/usr/include/openssl/ocsp.h
/usr/include/openssl/opensslconf-x86_64.h
/usr/include/openssl/opensslconf.h
/usr/include/openssl/opensslv.h
/usr/include/openssl/ossl_typ.h
/usr/include/openssl/pem.h
/usr/include/openssl/pem2.h
/usr/include/openssl/pkcs12.h
/usr/include/openssl/pkcs7.h
/usr/include/openssl/pqueue.h
/usr/include/openssl/rand.h
/usr/include/openssl/rc2.h
/usr/include/openssl/rc4.h
/usr/include/openssl/ripemd.h
/usr/include/openssl/rsa.h
/usr/include/openssl/safestack.h
/usr/include/openssl/seed.h
/usr/include/openssl/sha.h
/usr/include/openssl/srtp.h
/usr/include/openssl/ssl.h
/usr/include/openssl/ssl2.h
/usr/include/openssl/ssl23.h
/usr/include/openssl/ssl3.h
/usr/include/openssl/stack.h
/usr/include/openssl/symhacks.h
/usr/include/openssl/tls1.h
/usr/include/openssl/ts.h
/usr/include/openssl/txt_db.h
/usr/include/openssl/ui.h
/usr/include/openssl/ui_compat.h
/usr/include/openssl/whrlpool.h
/usr/include/openssl/x509.h
/usr/include/openssl/x509_vfy.h
/usr/include/openssl/x509v3.h
/usr/lib64/libcrypto.so
/usr/lib64/libssl.so
/usr/lib64/pkgconfig/libcrypto.pc
/usr/lib64/pkgconfig/libssl.pc
/usr/lib64/pkgconfig/openssl.pc
答案 2 :(得分:1)
使用flag --with-darwinssl
解决此问题转到包含curl源代码的文件夹
在此下载 https://curl.haxx.se/download.html
Build Settings
重新启动你的控制台,它就完成了!