|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81276 Using curl/libcurl with NSS backend fails to load curl extension
Submitted: 2021-07-21 00:06 UTC Modified: 2021-07-23 15:30 UTC
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: 1001malac at gmail dot com Assigned:
Status: Open Package: cURL related
PHP Version: 7.4.21 OS: Debian 10.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
37 + 43 = ?
Subscribe to this entry?

 [2021-07-21 00:06 UTC] 1001malac at gmail dot com

I'm using cURL 7.64.0 with the NSS SSL backend, instead of OpenSSL. The problem I'm facing is php complains whenever it has to load the curl extension:

PHP Warning:  PHP Startup: Unable to load dynamic library '' (tried: /usr/lib/php/20190902/ (/lib/x86_64-linux-gnu/ version `CURL_OPENSSL_4' not found (required by /usr/lib/php/20190902/, /usr/lib/php/20190902/ (/usr/lib/php/20190902/ cannot open shared object file: No such file or directory)) in Unknown on line 0

Is there any way to use php's curl extension without openssl dependencies baked in? Maybe selecting the SSL backend somehow as detailed in the following link?


# curl --version
curl 7.64.0 (x86_64-pc-linux-gnu) libcurl/7.64.0 NSS/3.42.1 zlib/1.2.11 brotli/1.0.7 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.5) nghttp2/1.36.0
Release-Date: 2019-02-06
Protocols: file ftp ftps http https 
Features: AsynchDNS IDN IPv6 Largefile NTLM SSL libz brotli HTTP2 UnixSockets HTTPS-proxy PSL 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-07-21 11:54 UTC]
Can you please run ldd /usr/bin/curl to confirm that you curl binary is linked against the same

The error message looks like your is borked. PHP doesn't particularly care whether your curl is linked against openssl, gnutls or nss. (We only specially handle using an old openssl version, but that should fail in a different way.)
 [2021-07-22 23:34 UTC] 1001malac at gmail dot com
Here you go: (0x00007ffd799e2000) => /lib/x86_64-linux-gnu/ (0x00007f678a924000) => /lib/x86_64-linux-gnu/ (0x00007f678a90a000) => /lib/x86_64-linux-gnu/ (0x00007f678a900000) => /lib/x86_64-linux-gnu/ (0x00007f678a77d000) => /lib/x86_64-linux-gnu/ (0x00007f678a778000) => /lib/x86_64-linux-gnu/ (0x00007f678a5cd000) => /lib/x86_64-linux-gnu/ (0x00007f678a539000) => /lib/x86_64-linux-gnu/ (0x00007f678a250000) => /lib/x86_64-linux-gnu/ (0x00007f678a1cb000) => /lib/x86_64-linux-gnu/ (0x00007f6789fad000) => /lib/x86_64-linux-gnu/ (0x00007f6789f56000) => /lib/x86_64-linux-gnu/ (0x00007f6789d95000) => /lib/x86_64-linux-gnu/ (0x00007f6789d72000)
	/lib64/ (0x00007f678adda000) => /lib/x86_64-linux-gnu/ (0x00007f6789a97000) => /lib/x86_64-linux-gnu/ (0x00007f67898c8000) => /lib/x86_64-linux-gnu/ (0x00007f6787ed8000) => /lib/x86_64-linux-gnu/ (0x00007f6787eb0000) => /lib/x86_64-linux-gnu/ (0x00007f6787d2a000) => /lib/x86_64-linux-gnu/ (0x00007f6787d10000)
 [2021-07-22 23:35 UTC] 1001malac at gmail dot com
Well, forget the previous one, this is it: (0x00007fff701f9000) => /lib/x86_64-linux-gnu/ (0x00007fb7049b2000) => /lib/x86_64-linux-gnu/ (0x00007fb7049ad000) => /lib/x86_64-linux-gnu/ (0x00007fb70496c000) => /lib/x86_64-linux-gnu/ (0x00007fb70474e000) => /lib/x86_64-linux-gnu/ (0x00007fb70472d000) => /lib/x86_64-linux-gnu/ (0x00007fb70456c000) => /lib/x86_64-linux-gnu/ (0x00007fb704542000) => /lib/x86_64-linux-gnu/ (0x00007fb704523000) => /lib/x86_64-linux-gnu/ (0x00007fb704510000) => /lib/x86_64-linux-gnu/ (0x00007fb7043c2000) => /lib/x86_64-linux-gnu/ (0x00007fb704390000) => /lib/x86_64-linux-gnu/ (0x00007fb704361000) => /lib/x86_64-linux-gnu/ (0x00007fb704306000) => /lib/x86_64-linux-gnu/ (0x00007fb7042ff000) => /lib/x86_64-linux-gnu/ (0x00007fb7042f0000) => /lib/x86_64-linux-gnu/ (0x00007fb7042eb000) => /lib/x86_64-linux-gnu/ (0x00007fb7042e1000)
	/lib64/ (0x00007fb704a65000) => /lib/x86_64-linux-gnu/ (0x00007fb70415b000) => /lib/x86_64-linux-gnu/ (0x00007fb703fd8000) => /lib/x86_64-linux-gnu/ (0x00007fb703fb5000)
 [2021-07-23 06:05 UTC]
Did you build PHP yourself, or are you using a pre-built PHP from
your distro/PPA?
 [2021-07-23 15:30 UTC] 1001malac at gmail dot com
I'm running under Debian 10. 

apt-get source curl
modified the rules to my liking, removed slack, compile with debuild, install.

Only curl got recompiled. I've tried 7.3 as it's the version provided with the distro, then also tried with the semi official Sury's php 7.4 packages and it's the same.
 [2022-04-22 10:51 UTC] arunsharmaji982 at gmail dot com
This is very interesting, You are a very skilled blog. I have joined your feed and stay up all night looking for your excellent article and more.
 [2022-04-22 10:53 UTC] arunsharmaji982 at gmail dot com
Thanks, Your Post Such a great & informative post about the Mastercard Updates its Iconic Logo and Brand Identity, Thanks for sharing
 [2023-07-31 09:28 UTC] parkassrah34 at gmail dot com
Recompile PHP cURL Extension: You can try recompiling the PHP cURL extension using the libcurl version that's linked with NSS. Ensure that PHP and libcurl are both built with the same SSL backend.

Use PHP FPM: Another option is to use PHP-FPM with a separate PHP configuration. In the PHP-FPM configuration, you can specify the correct cURL library and link it to NSS instead of OpenSSL.

 [2023-07-31 09:59 UTC] thuongchodoisl024 at gmail dot com
Thanks for sharing this information (
 [2023-08-20 12:17 UTC] gmglobalconnectwebsite at gmail dot com
I really like this, clean minimal, responsive just what i was looking for, cheers mate

 [2023-11-29 08:46 UTC] lauryfriese932 at gmail dot com
We only specially handle using an old openssl version, but that should fail in a different way. (
 [2024-06-26 04:51 UTC] dmmnychl123 at gmail dot com
Your generosity in sharing is greatly appreciated.(
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jul 19 11:01:30 2024 UTC