Score:0

Getting an error when trying to install libcurl4-openssl-dev on Ubuntu 20.04

it flag

I am currently trying to run some R code on Databricks. Some R packages require that I install libcurl4-openssl-dev. I am getting the following error while trying to install libcurl4-openssl-dev:

Ign:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4-openssl-dev amd64 7.68.0-1ubuntu2.15
Err:1 http://security.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4-openssl-dev amd64 7.68.0-1ubuntu2.15
  404  Not Found [IP: 185.125.190.39 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl4-openssl-dev_7.68.0-1ubuntu2.15_amd64.deb  404  Not Found [IP: 185.125.190.39 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

I have tried apt-get update before installing packages, but it hasn't helped. The problem seems to be that it is trying to look for 7.68.0-1ubuntu2.15 whereas the latest version seems to be 7.68.0-1ubuntu2.16

I have also tried running the following before trying to install again:

sudo apt --fix-missing update

sudo apt update

sudo apt install -f

Didn't help either. Any suggestions how I can install libcurl4-openssl-dev will be very helpful. Thanks!

Edit: sudo apt update gives the following output

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Hit:1 https://repos.azul.com/zulu/deb stable InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists...
Building dependency tree...
Reading state information...
All packages are up to date.

apt-cache policy libcurl4-openssl-dev gives the following output

libcurl4-openssl-dev:
  Installed: (none)
  Candidate: 7.68.0-1ubuntu2.15
  Version table:
     7.68.0-1ubuntu2.15 500
        500 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     7.68.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages`

Not sure if the order of installation of packages matters, but thought I will mention it anyway here. Here is what I am trying:

apt-get update

apt-get install -y make libnode-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libpng-dev libudunits2-dev libicu-dev

sudo apt --fix-missing update

sudo apt update

sudo apt install -f

apt-get install -y libssl-dev libcurl4-openssl-dev pandoc

If I try apt install libcurl4-openssl-dev after the above, I get the following, but it has been 15 minutes now and the command hasn't finished running yet. Not sure if this should be taking this much time. It is still running as I post this update.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
Suggested packages:
  libcurl4-doc libidn11-dev libkrb5-dev libldap2-dev librtmp-dev
The following packages will be REMOVED:
  libcurl4-gnutls-dev
The following NEW packages will be installed:
  libcurl4-openssl-dev
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 322 kB of archives.
After this operation, 13.3 kB of additional disk space will be used.

Solution The following seems to work, but I am not completely sure why. I am very new to Linux, so I don't understand this a lot. I thought I will mention it here so it could help others. If there is anyone here who can explain why this happens, that would be great!

Here is the output of sudo apt-get update

Hit:1 https://repos.azul.com/zulu/deb stable InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Reading package lists...

Now, here is the result of sudo add-apt-repository 'deb http://mirrors.kernel.org/ubuntu focal-updates main'

sudo apt-get update

Hit:2 https://repos.azul.com/zulu/deb stable InRelease
Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease
Get:1 http://mirrors.edge.kernel.org/ubuntu focal-updates InRelease [114 kB]
Hit:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Get:7 http://mirrors.edge.kernel.org/ubuntu focal-updates/main amd64 Packages [3,014 kB]
Fetched 3,128 kB in 2s (1,690 kB/s)
Reading package lists...
Hit:2 https://repos.azul.com/zulu/deb stable InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:1 http://mirrors.edge.kernel.org/ubuntu focal-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:6 http://security.ubuntu.com/ubuntu focal-security InRelease
Reading package lists...

When I try to install libcurl4-openssl-dev after I add the repository, I am able to install it without any issue. If I try to do it without adding the repository, I get an error. I am happy that I found a solution, but would love to know why I need to do this. Why doesn't it search the "focal-updates main" right away at the beginning? Should I be doing this every time that I need to install a package?

pl flag
Please could you show us the output of `sudo apt update`?
shishir rao avatar
it flag
`WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Hit:1 https://repos.azul.com/zulu/deb stable InRelease Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease Hit:3 http://security.ubuntu.com/ubuntu focal-security InRelease Hit:4 http://archive.ubuntu.com/ubuntu focal-updates InRelease Hit:5 http://archive.ubuntu.com/ubuntu focal-backports InRelease Reading package lists... Building dependency tree... Reading state information... All packages are up to date.`
pl flag
What does `apt-cache policy libcurl4-openssl-dev` report? - please add to your question above. It's easier to read than in a comment.
waltinator avatar
it flag
Does `apt-cache search libcurl4` help?
shishir rao avatar
it flag
@waltinator I did run that command and it does show libcurl4-openssl-dev, the package that I am having trouble installing.
shishir rao avatar
it flag
@popey I have edited the question with the outputs to what you have requested. Thanks!
pl flag
If you now retry doing the `apt install libcurl4-openssl-dev` what happens?
shishir rao avatar
it flag
@popey I have edited the question with the requested output. The command is still running (15 minutes and counting)....
pl flag
Isn't it asking you to answer "y" to continue?
shishir rao avatar
it flag
@popey it wasn't, but I am running it with the `-y` and it seems to be working! Thanks!
shishir rao avatar
it flag
@popey OK so I restarted the cluster today and tried and I am getting the same error :( . I am not really sure why this happens. I restarted the cluster multiple times yesterday and it did seem to recognize libcurl4-openssl-dev amd64 7.68.0-1ubuntu2.16. Today, it is unable to do it and keeps giving the error ```Err:1 http://security.ubuntu.com/ubuntu focal-updates/main amd64 libcurl4-openssl-dev amd64 7.68.0-1ubuntu2.15 404 Not Found [IP: 185.125.190.39 80]```
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.