Could not initialize OpenSSL library - ubuntu 24.10 lazarus / 21-General ---------------------------------------------------------------------- Ericktux · 2025-04-12 13:57 Hi friend, I'm on Ubuntu 24.10 with Lazarus 3.8 and this code gives me the following error: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i Could not initialize OpenSSL libraryAnd this is the code I use: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i uses  Classes, SysUtils, Forms,  opensslsockets, fphttpclient,  process, fpjson, jsonparser,  Controls, Graphics, Dialogs, StdCtrls;  ...  private    function ObtenerUltimaVersionGitHub: string; ...function TForm1.ObtenerUltimaVersionGitHub: string;var  HttpClient: TFPHTTPClient;  JSONData: TJSONData;  JSONStr: string;begin  Result := '';  HttpClient := TFPHTTPClient.Create(nil);  try    HttpClient.AddHeader('User-Agent', 'Mozilla/5.0');    JSONStr := HttpClient.Get('https://api.github.com/repos/yt-dlp/yt- dlp/releases/latest');    JSONData := GetJSON(JSONStr);    Result := JSONData.FindPath('tag_name').AsString;  except    on E: Exception do      Memo1.Lines.Add('Error al consultar GitHub: ' + E.Message);  end;  HttpClient.Free;end; When I type this into the terminal: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i openssl version I get the following: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i OpenSSL 3.3.1 4 Jun 2024 (Library: OpenSSL 3.3.1 4 Jun 2024) Please help  PD: It works fine on Windows ---------------------------------------------------------------------- Fred vS · 2025-04-12 14:31 Hello. Try this: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i ...uses openssl, { This implements the procedure InitSSLInterface }... function TForm1.ObtenerUltimaVersionGitHub: string;var  HttpClient: TFPHTTPClient;  JSONData: TJSONData;  JSONStr: string;begin  Result := '';  InitSSLInterface;  // Add this  HttpClient := TFPHTTPClient.Create(nil);  try    HttpClient.AddHeader('User-Agent', 'Mozilla/5.0');    JSONStr := HttpClient.Get('https://api.github.com/repos/yt-dlp/yt- dlp/releases/latest');    JSONData := GetJSON(JSONStr);    Result := JSONData.FindPath('tag_name').AsString;  except    on E: Exception do      Memo1.Lines.Add('Error al consultar GitHub: ' + E.Message);  end;  HttpClient.Free;end; ---------------------------------------------------------------------- Ericktux · 2025-04-12 14:53 Thank you very much my friend for your help, I just tried it but the same error persists. ---------------------------------------------------------------------- TRon · 2025-04-12 15:25 Quote from: Ericktux on April 12, 2025, 04:53:53 pmThank you very much my friend for your help, I just tried it but the same error persists.  Good news: code works  bad news: needs manual labour to find error. Please start app from a terminal window and see if it produces a more meaningful error. If it does please paste error here. If that does not produce a useful error message then open a terminal and use strace . to find out what exact library is missing (I am assuming that your problem is related to  a missing library). Note that it might be that trunk fpc is required for newer ssl libraries or use the dev package solution (meaning install all the relevant dev packages that link to the correct ssl libraries). ---------------------------------------------------------------------- Ericktux · 2025-04-12 19:17 Hello friend, thank you very much for your help. The command "strace ./project1" gives me too much information. I used the following command (IA): Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i strace -e trace=openat ./project1 2>&1 | grep -i ssl and it returned the following: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libssl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux- gnu/libssl.so.1.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.11", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libssl.so.11", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.11", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.11", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux- gnu/libssl.so.10", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.10", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.10", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.10", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.1.0.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.0.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.0.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.0.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.1.0.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.0.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.0.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.0.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.1.0.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.0.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.0.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.0.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.1.0.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.0.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.0.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.0.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.1.0.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.0.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.0.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.0.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.1.0.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.0.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.0.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.0.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.1.0.0", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.8", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.7", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.7", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.7", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.7", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.6", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.5", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.4", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.3", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.2", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libssl.so.0.9.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/x86_64-linux- gnu/libssl.so.0.9.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/lib/libssl.so.0.9.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio)openat(AT_FDCWD, "/usr/lib/libssl.so.0.9.1", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No existe el archivo o el directorio) Apparently, Lazarus Pascal works with OpenSSL 1.1, but Ubuntu 24.10 works with OpenSSL 3.3.1. What do you recommend, friends? ---------------------------------------------------------------------- TRon · 2025-04-12 19:37 Quote from: Ericktux on April 12, 2025, 09:17:07 pmHello friend, thank you very much for your help. The command "strace ./project1" gives me too much information. I used the following command (IA): Yes, I probably should have mentioned that the output can be shortend with only checking open. Good that you were able to figure that out on your own. QuoteWhat do you recommend, friends?  In theory, it could be solved with installing the dev package. Have you installed package libssl-dev ? When installed there will be softlinks installed in the system that point to the correct library (while the application still uses the old name). If that also fails, and in case this version is already supported, then using main/trunk FPC compiler is the only other option (*). (*() with the exception of downgrading OS and/or libssl which are both not advisable to do. ---------------------------------------------------------------------- Ericktux · 2025-04-13 04:26 Thank you very much my friend, installing "libssl-dev" solved the problem. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i sudo apt install libssl-dev Greetings and thanks