0

I've Ubuntu 18.04.3 LTS (GNU/Linux 4.15.0-65-generic x86_64) and I need to install curl, but I'm getting this error, any help?

admin@mail:~$ sudo apt-get install curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 curl : Depends: libcurl3-gnutls (= 7.47.0-1ubuntu2.14) but 7.58.0-2ubuntu3.8 is to be installed
E: Unable to correct problems, you have held broken packages.
  • Ubuntu 18.04 LTS or Ubuntu 18.10? Please [edit](https://askubuntu.com/posts/1227385/edit) your question and update to what version you are using. – Terrance Apr 15 '20 at 16:55
  • 2
    Looks like you have at least one 16.04 (Xenial) source installed. Delete all wrong-version sources. Then run `sudo apt update` because your sources changed. Then try installing curl again. – user535733 Apr 15 '20 at 17:06
  • Ubuntu 18.04.3 LTS. How can I delete all wrong-version sources? – delAIM gestão Apr 16 '20 at 16:17
  • Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages) – karel Apr 16 '20 at 16:23
  • Unfortunately no... I don't see any broken packages:`dpkg --get-selections | grep hold` returns nothing. But this: `dpkg --get-selections | grep curl` returned this: `libcurl3:amd64 install libcurl3-gnutls:amd64 install libcurl4-openssl-dev:amd64 install php-curl install php7.0-curl install php7.2-curl deinstall python3-pycurl install ` – delAIM gestão Apr 16 '20 at 16:49
  • Should I uninstall libcurl3-gnutls (= 7.47.0-1ubuntu2.14) first? And try again? How can I do it? – delAIM gestão Apr 17 '20 at 07:08
  • If the `libcurl3-gnutls` is installed, remove it first. However, if you run `apt-cache madison curl` and `apt-cache madison libcurl3-gnutls` you should see the versions match. If they are not, then something in your `/etc/apt/sources.list` file might not be configured properly, or a repository in there is incorrect for 18.04 when they should all be set as `bionic`. Or some sort of 3rd party repository / PPA is setup on your system overriding it. The `apt-cache madison` commands do show you where those versions are coming from. – Terrance Apr 22 '20 at 13:32
  • One other thing you can try if multiple versions of `curl` are available is to specify the version you want to install. `sudo apt install curl=7.58.0-2ubuntu3.8` – Terrance Apr 22 '20 at 13:36

0 Answers0