SSL not available when attempting to compile “wget” from source?

4

2

I was trying to install wget from source in Linux by:

./configure --with-ssl=openssl

But it returns me:

configure: error: --with-ssl=openssl was given, but SSL is not available.

If I do:

root@qemux86:/mnt/sdc2/wget-1.16# which openssl
/mnt/sdc2/miniconda/bin/openssl

So OpenSSL must have been installed. Why it still says SSL is not available?

andy_ttse

Posted 2015-03-29T05:50:21.337

Reputation: 51

Please edit your question to clearly indicate what version of Linux are you running so we can better assist you. – JakeGould – 2015-03-29T06:07:41.903

Answers

2

So OpenSSL must be installed. Why it still says SSL is not available?

Yes, OpenSSL is installed as an already compiled binary on your system, but the shared libraries and related headers needed for source compilation are not installed. Thus that configure error when you attempt to compile wget from source; you need to install those shared libraries to compile successfully with the --with-ssl=openssl flag.

To check if the OpenSSL libraries are installed on your system, just run ldconfig like this:

ldconfig -p | grep ssl

And the output should be something like this; taken from a running Ubuntu system I manage:

libssl.so.1.0.0 (libc6,x86-64) => /lib/x86_64-linux-gnu/libssl.so.1.0.0
libssl.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libssl.so

If your output is blank, shared libraries for OpenSSL are not installed. So you should install them.

Unsure what flavor of Linux you are using, but un Ubuntu/Debian you would run this via apt-get command to get that installed:

sudo apt-get install libssl-dev

And on a CentOS/RedHat system you would install it via yum like this:

yum install -y openssl-devel

Also if you are somehow worried about installing shared libraries on your system, don’t worry. They basically just sit there and do nothing until needed for compilation or runtime usage by a program. Meaning the files would only take up physical space on the system and would not add an extra CPU or memory load on your system by simply being installed.

JakeGould

Posted 2015-03-29T05:50:21.337

Reputation: 38 217

How do I check whether if I have installed the shared development library? – andy_ttse – 2015-03-29T05:58:59.507

it returns me libssl.so.1.0.0 (libc6) => /usr/lib/libssl.so.1.0.0 – andy_ttse – 2015-03-29T06:06:55.607

@andy_ttse Check my new edit. Just run ldconfig -p | grep ssl. But if you are having compilation issues, chances are high that you don’t have OpenSSL installed at all. Shared libraries are typically not installed unless one explicitly installs them onto a system. And they are mainly installed for task where one needs to compile items from source like what you are doing. – JakeGould – 2015-03-29T06:07:23.680

@andy_ttse Yes, but it doesn’t indicate libssl.so is installed and you are clearly having compilation issues. You might have a partial set of shared libraries installed and not the full set. I recommend you just install the libssl-dev/openssl-devel package from whatever repository your system uses and try compiling wget from source again. – JakeGould – 2015-03-29T06:09:41.847

Actually Ubuntu and CentOS/RH at least (and I believe most others) uses dynamic linking and lib{crypto,ssl}.so.$suffix are included in the 'basic' (runtime) package along with the executable openssl which uses and thus requires them: see ldd $(which openssl). Other packaged programs e.g. apache/httpd also use the so's. But to compile you do need -devel for the headers, and it also provides documentation (man pages). – dave_thompson_085 – 2016-06-17T10:12:32.363