skip to Main Content

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


  1. this works well with latest Ubuntu version

    apt-get install -y guile-2.2-dev
    

    you probably need to freeze the Ubuntu version you use and you can optimise your Dockerfile

    FROM ubuntu:20.04
    
    ARG DEBIAN_FRONTEND=noninteractive
    
    RUN apt-get update -y && apt-get install -y bison guile-2.0-dev
    

    UPDATE:

    there is also https://packages.ubuntu.com site to find packages, for instance

    https://packages.ubuntu.com/search?suite=default&section=all&arch=any&keywords=guile-2.0-dev&searchon=names

    Login or Signup to reply.
  2. Your Dockerfile pulls ubuntu which defaults to latest tag, which is jammy-jellyfish/22.04. guile-2.0-dev doesn’t exist in that version, it was upgraded to guile-2.2-dev, so you’d want to do RUN apt-get update && apt-get install -y guile-2.2-dev.

    FROM ubuntu
    
    ARG DEBIAN_FRONTEND=noninteractive
    RUN apt-get update && apt-get install -y bison guile-2.2-dev
    

    If you specifically need guile-2.0-dev, you will need FROM ubuntu:focal (v20.04) or FROM ubuntu:bionic (v18.04) depending on what Ubuntu you want.

    FROM ubuntu:focal
    
    ARG DEBIAN_FRONTEND=noninteractive
    RUN apt-get update && apt-get install -y bison guile-2.0-dev
    

    Also see the ubuntu packages list: https://packages.ubuntu.com/cgi-bin/search_packages.pl?keywords=guile&searchon=names&release=all

    Package guile-2.0-dev
    
        bionic (18.04LTS) (lisp): Development files for Guile 2.0
        2.0.13+1-5build2: amd64 arm64 armhf i386 ppc64el s390x
        bionic-updates (lisp): Development files for Guile 2.0
        2.0.13+1-5ubuntu0.1: amd64 arm64 armhf i386 ppc64el s390x
        focal (20.04LTS) (lisp): Development files for Guile 2.0 [universe]
        2.0.13+1-5.4: amd64 arm64 armhf i386 ppc64el s390x
    
    Package guile-2.2-dev
    
        bionic (18.04LTS) (lisp): Development files for Guile 2.2 [universe]
        2.2.3+1-3build1: amd64 arm64 armhf i386 ppc64el s390x
        bionic-updates (lisp): Development files for Guile 2.2 [universe]
        2.2.3+1-3ubuntu0.1: amd64 arm64 armhf i386 ppc64el s390x
        focal (20.04LTS) (lisp): Development files for Guile 2.2
        2.2.7+1-4: amd64 arm64 armhf i386 ppc64el s390x
        impish (21.10) (lisp): Development files for Guile 2.2
        2.2.7+1-6build1: amd64 arm64 armhf i386 ppc64el s390x
        jammy (22.04LTS) (lisp): Development files for Guile 2.2
        2.2.7+1-6build2: amd64 arm64 armhf i386 ppc64el s390x
        kinetic (lisp): Development files for Guile 2.2 [universe]
        2.2.7+1-6build2: amd64 arm64 armhf ppc64el s390x
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search