简体   繁体   English

在Ubuntu 10.04上使用最新OpenSSL的Opdate Curl

[英]Opdate Curl with newest OpenSSL on Ubuntu 10.04

I have a very old Ubuntu server running 10.04. 我有一台非常老的运行10.04的Ubuntu服务器。

It will go out of production over the summer but I have a problem now that requires that i update the PHP curl to use OpenSSL so i have TLS v 1.2. 它会在夏天停产,但是现在我有一个问题,要求我更新PHP curl以使用OpenSSL,所以我有TLS v 1.2。 The one shipped with 10.04 doesn't support this version. 10.04附带的版本不支持此版本。

From OpenSSL i downloaded v 1.0.1u. 我从OpenSSL下载了v 1.0.1u。

I did a: 我做了:

./buildconf
./configure
make
make install

having completed the process i do a 完成了过程,我做了一个

d7:~/openssl-1.0.1u$ openssl version
OpenSSL 1.0.1u  22 Sep 2016
d7:~/openssl-1.0.1u$ ^C

So the update of OpenSSL seems to have completed successfully. 因此,OpenSSL的更新似乎已成功完成。

All the OpenSSL libraries, headers and so on seems to have been created in 所有的OpenSSL库,标头等似乎都已在其中创建

/usr/local/ssl

The subdirectory ./lib contains 子目录./lib包含

libcrypto.a and libssl.a which i suppose are the static libraries. 我想的libcrypto.a和libssl.a是静态库。

I think the openSSL installation is correct and it seems fine. 我认为openSSL安装正确,而且看起来还不错。

I downloaded Curl v 7.39.0 and want it to use the newly installed openSSL installation. 我下载了Curl v 7.39.0,并希望它使用新安装的openSSL安装。 But no matter what i do it doesn't seems to find the correct libraries. 但是,无论我做什么,似乎都找不到正确的库。

I do a: 我做:

./buildconf

and it ends succesfully. 它成功结束了。

now the problems starts. 现在问题开始了。

If I do a 如果我做一个

./configure make make install ./configure make make install

it bulds curl but without any SSL support. 它会卷曲但没有任何SSL支持。

I i do any of the following: 我执行以下任一操作:

./configure --with-ssl=/usr/local 
./configure --with-ssl --with-libssl-prefix=/usr/local
./configure --with-ssl --with-libssl-prefix=/usr/local/ssl
./configure --with-ssl --with-libssl-prefix=/usr/local/ssl

env PKG_CONFIG_PATH=/usr/local/ssl/lib/pkgconfig ./configure --with-ssl 

it stops the .configure step with: 它使用以下命令停止.configure步骤:

checking for SSL_connect in -lssl... no
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!

I have read several SO answers on how to compile CURLK this way but it doesn't seems to work for me. 我已经阅读了关于如何以这种方式编译CURLK的几个SO答案,但是它似乎对我不起作用。

can anybody shed some light on what I'm missing? 有人可以阐明我所缺少的吗?

I'm in a very similar situation. 我的处境非常相似。 After about a day of messing with parameters, I found the magic that makes curl (7.58) compile correctly with openssl support. 经过大约一天的参数弄乱后,我发现了可以使curl(7.58)在openssl支持下正确编译的魔术。

CPPFLAGS="-I/usr/local/ssl/include" LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib" ./configure  --with-ssl=/usr/local/ssl --enable-shared

I also passed in --with-zlib and --prefix=/usr/local/curl, but those probably aren't strictly necessary. 我还传递了--with-zlib和--prefix = / usr / local / curl,但是这些可能并不是严格必需的。

Basically you need to tell it not only where your openssl install lives but half of the specific paths within that directory! 基本上,您不仅需要告诉它opensl的​​安装位置,而且还需要告诉该目录中一半的特定路径!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM