简体   繁体   中英

Opdate Curl with newest OpenSSL on Ubuntu 10.04

I have a very old Ubuntu server running 10.04.

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. The one shipped with 10.04 doesn't support this version.

From OpenSSL i downloaded 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.

All the OpenSSL libraries, headers and so on seems to have been created in

/usr/local/ssl

The subdirectory ./lib contains

libcrypto.a and libssl.a which i suppose are the static libraries.

I think the openSSL installation is correct and it seems fine.

I downloaded Curl v 7.39.0 and want it to use the newly installed openSSL installation. 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

it bulds curl but without any SSL support.

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:

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.

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.

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.

Basically you need to tell it not only where your openssl install lives but half of the specific paths within that directory!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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