Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to work with Boost:asio to establish a SSL connection.

Now, my compiler says, it can't find openssl/conf.h

I'd like to know where this path is and how to fix this problem.

Thanks in advance.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

In my path, it is /usr/include/openssl/conf.h, and we can query dpkg to find the package that it comes from with:

dpkg -S /usr/include/openssl/conf.h

which gives the result:

libssl-dev: /usr/include/openssl/conf.h

Therefore you must run

sudo apt-get install libssl-dev

in order to get the development files for the program.

If you already have it installed in a non-standard location, you can export that into the build environment with

export LD_LIBRARY_PATH=/location/of/lib

You can also use the build-dep command to install all the necessary files for a particular program, e.g.

sudo apt-get build-dep openssl
share|improve this answer
    
Now I'm getting undefined refernece errors. Does this mean that I have to link the libs, if yes, where are they? –  Yadin20 Nov 2 '12 at 16:56
    
The standard location of the development libs is /usr/include/openssl. –  user76204 Nov 2 '12 at 16:59
    
That are the headers, but I get undefined refernece error. Are there any shared objects? (That was my question actually) –  Yadin20 Nov 2 '12 at 17:01
    
The only shared objects for openssl are in /usr/lib/i386-linux-gnu/openssl-1.0.0/engines/. –  user76204 Nov 2 '12 at 17:04

Header files are usually shipped in separate packages with -dev suffix. In this case the file you need is in libssl-dev.

You can use the Ubuntu Package Contents Search pages to locate the correct dev package for missing headers.

Any headers installed by the dev packages should be found automatically under the default search path, so it will usually suffice to install the required package to fix the problem.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.