/usr/local/bin/curl: symbol lookup error: /usr/local/bin/curl: undefined symbol: curl_mime_free

websafe

Verified User
Joined
Jun 15, 2010
Messages
83
Location
Opole, PL
Hello,

after upgrading curl
Code:
./build curl
/usr/local/bin/curl throws the following error:

Code:
# /usr/local/bin/curl
curl: try 'curl --help' or 'curl --manual' for more information
/usr/local/bin/curl: symbol lookup error: /usr/local/bin/curl: undefined symbol: curl_mime_free
and this causes a problem when I try to generate Let'sEncrypt certificates.

Is there a known way to fix /usr/local/bin/curl?

Running `LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/curl` works fine, but tha't not really what we want, right?
 
Last edited:

toml

Verified User
Joined
Oct 3, 2003
Messages
1,197
Location
Scottsdale, AZ
Your issue is that you built curl using the libraries in /usr/local/lib but when running it, it is defaulting to using the existing $LD_LIBRARY_PATH or the built in system locations (i.e. /lib, /lib64, /usr/lib, /usr/lib64). If you have a package of curl that was installed with your distsro, then I recommend you remove the distro one and continue using the version in /usr/local, or make sure your LD_LIBRARY_PATH always contains /usr/local/lib earlier in the path than the system locations.
 

websafe

Verified User
Joined
Jun 15, 2010
Messages
83
Location
Opole, PL
@toml Is it safe to remove the curl package from my distro? https://help.directadmin.com/item.php?id=354 requires to install libcurl-devel...

I'm on CentOS 6.10 and my /etc/ld.so.conf contains:
Code:
# cat /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/lib64
/usr/local/lib
I could nowhere find th requirement that I should place /usr/local/lib before all other entries in ld.so.conf. Is this the case?
 

toml

Verified User
Joined
Oct 3, 2003
Messages
1,197
Location
Scottsdale, AZ
Don't add it to your ld.so.conf that could potentially break some system applications. I suggest that you update the scripts that call curl to insert the LD_LIBRARY_PATH. I have looked at my system (CentOS 7) and I have curl installed via rpm but I noticed that my custombuild didn't build a version of curl in /usr/local. I do have curl=yes in my options.conf but it still doesn't seem to have actually done the build.
 
Top