0

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?

11
  • Please could you show us the output of sudo apt update?
    – popey
    Mar 6, 2023 at 21:35
  • 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. Mar 6, 2023 at 22:02
  • What does apt-cache policy libcurl4-openssl-dev report? - please add to your question above. It's easier to read than in a comment.
    – popey
    Mar 6, 2023 at 22:04
  • Does apt-cache search libcurl4 help?
    – waltinator
    Mar 6, 2023 at 22:05
  • @waltinator I did run that command and it does show libcurl4-openssl-dev, the package that I am having trouble installing. Mar 6, 2023 at 22:23

0

You must log in to answer this question.

Browse other questions tagged .