Lazarus, Linux, Indy 10 and OpenSSL error

Veröffentlicht von

Using the IdHTTP component to access https websites, returned an error: „Could not load SSL library2“.

On Linux, I tried to use Lazarus with the Indy 10 components. I wanted to use the „IdHttp“ component to access and download something from the internet. The code is quite simple:

html:= IdHTTP1.Get('');

Howewer I got an error, that the SSL library could not be found.

Could not load SSL library.
In file 'IdSSLOpenSSL.PAS'

Searching the internet, the problem is, that the library is either missing or installed in the wrong version. Indy 10 still needs the version 1.0.2.

For Windows, it should be enough to place the DLLs in the program folder. You can find binary releases here.

On Linux, I compiled the version, with the following set of commands:

tar -xf openssl-1.0.2u.tar.gz
cd openssl-1.0.2u
./config shared

After that, I copied the library files over to the program folder.

cp *.so /path/to/copy/to

However is is not enough for Linux, as the program does not look there by default.

So I needed to point the Indy components to the correct folder:


The complete example code:

unit IdSSLOpenSSLHeaders

procedure TForm1.Button1Click(Sender: TObject);
var html, path:string;
  path:= ExtractFilePath(Application.ExeName);

  html:= IdHTTP1.Get('');
  Memo1.Text:= html;

After that the download worked.

Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert