How to create lib curl-gnutls.so.4

user2701114 picture user2701114 · May 3, 2016 · Viewed 21.2k times · Source

So, I'm an idiot, and I accidentally deleted the file libcurl-gnutls.so.4 on my Ubuntu system. Now I can't figure out how to recreate it. The actual error I'm getting is when I'm trying to use git:

git-remote-https: error while loading shared libraries: libcurl-gnutls.so.4: cannot open shared object file: No such file or directory

And it's right! That file doesn't exist. But I don't know how to create it. I've tried using apt-get to install libcurl-gnutls, and while it says that it succeeds, it doesn't create the library. I also downloaded curl and built/installed it, but that also didn't create the library I need. Any ideas on how I can fix this?

Thank you so much for any help.

Answer

RaviTezu picture RaviTezu · May 3, 2016

I think, it is libcurl3-gnutls - Give it a try - sudo apt-get install libcurl3-gnutls.

This is how I figured it out, hoping this may help others:

Step1: Looked for the libcurl-gnutls.so.4 on my machine(Ubuntu 16.04).

ravitezu@Neutron:~$ locate libcurl-gnutls.so.4
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
/usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0

Step2: Check which package provides this file, when installed.

ravitezu@Neutron:~$ dpkg -S /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4
libcurl3-gnutls:amd64: /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4

So, it gave me the package name libcurl3-gnutls which provides that file.

Here are the files, which will be deployed when you install libcurl3-gnutls:

ravitezu@Neutron:~$ dpkg -c libcurl3-gnutls_7.47.0-1ubuntu2_amd64.deb 
drwxr-xr-x root/root         0 2016-02-18 13:48 ./
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/lib/
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/lib/x86_64-linux-gnu/
-rw-r--r-- root/root    444800 2016-02-18 13:48 ./usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4.4.0
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/share/
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/share/lintian/
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/share/lintian/overrides/
-rw-r--r-- root/root        67 2016-01-27 17:17 ./usr/share/lintian/overrides/libcurl3-gnutls
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/share/doc/
drwxr-xr-x root/root         0 2016-02-18 13:48 ./usr/share/doc/libcurl3-gnutls/
-rw-r--r-- root/root     10954 2016-01-27 17:17 ./usr/share/doc/libcurl3-gnutls/copyright
-rw-r--r-- root/root      1019 2016-02-18 13:48 ./usr/share/doc/libcurl3-gnutls/changelog.Debian.gz
-rw-r--r-- root/root       590 2016-01-27 17:17 ./usr/share/doc/libcurl3-gnutls/NEWS.Debian.gz
lrwxrwxrwx root/root         0 2016-02-18 13:48 ./usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 -> libcurl-gnutls.so.4.4.0
lrwxrwxrwx root/root         0 2016-02-18 13:48 ./usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.3 -> libcurl-gnutls.so.4