Shammer's Philosophy

My private adversaria

curl: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

I would like to use curl latest version always, so I don't install curl via apt-get, install it from tar ball instead. But, I always see the following error message when executing curl.

curl: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

I have not known libcurl.so is not installed with curl and I modified this error fixed by following steps.

  1. find / -name libcurl.so.4
  2. cd /etc/ld.so.conf.d
  3. cp libc.conf libcurl.conf
  4. if libcurl.so.4 location were not /usr/local/lib, modify libcurl.conf
  5. ldconfig
  6. curl

This is not correct procedure. Installing libcurl3 via apt-get can fix this problem. Maybe using --disable-libcurl-option can avoid above message also, but I have never test --disable-libcurl-option yet.