I have a Dockerfile which is calling RUN apt-get install guile-2.0-dev
This script is executed from Ubuntu 20.04.4LTS using the command "sudo docker build -f./Dockerfile -ttest:one ./"
. It shows the error:
E: Unable to locate package guile-2.0-dev
E: Couldn't find any package by glob 'guile-2.0-dev'
E: Couldn't find any package by regex 'guile-2.0-dev'"
But other apt-get
install commands called from Dockerfile works as expected. I am able to run apt-get install guile-2.0-dev
command from my terminal. Can you please help me to figure out the reason for it fail inside the docker script?
A sample script is given below. Bison
is installed successfully, but guile
fails
FROM ubuntu
RUN apt-get update
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y bison
RUN apt-get update && apt-get install -y guile-2.0-dev
2
Answers
this works well with latest Ubuntu version
you probably need to freeze the Ubuntu version you use and you can optimise your Dockerfile
UPDATE:
there is also https://packages.ubuntu.com site to find packages, for instance
https://packages.ubuntu.com/search?suite=default§ion=all&arch=any&keywords=guile-2.0-dev&searchon=names
Your
Dockerfile
pullsubuntu
which defaults tolatest
tag, which isjammy-jellyfish/22.04
.guile-2.0-dev
doesn’t exist in that version, it was upgraded toguile-2.2-dev
, so you’d want to doRUN apt-get update && apt-get install -y guile-2.2-dev
.If you specifically need
guile-2.0-dev
, you will needFROM ubuntu:focal
(v20.04) orFROM ubuntu:bionic
(v18.04) depending on what Ubuntu you want.Also see the ubuntu packages list: https://packages.ubuntu.com/cgi-bin/search_packages.pl?keywords=guile&searchon=names&release=all