Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package 'qt5-default' has no installation candidate #110

Open
MariaHei opened this issue Nov 8, 2022 · 2 comments
Open

Package 'qt5-default' has no installation candidate #110

MariaHei opened this issue Nov 8, 2022 · 2 comments

Comments

@MariaHei
Copy link

MariaHei commented Nov 8, 2022

Hi,

I'm trying to build a container on Mac OS Catalina 10.15.4 but run into the following error:

import SimpleContainerGenerator

mkpath("my_image_name")
cd("my_image_name")

pkgs = [
           "DataFrames"
       ]

julia_version = v"1.4.0"

SimpleContainerGenerator.create_dockerfile(pkgs;
                                                  julia_version = julia_version,
                                                  output_directory = pwd())

run(`docker build -t my_user_name/my_image_name .`)

Output/Stacktrace:

[+] Building 2.5s (10/111)                                                      
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 9.29kB                                     0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/library/ubuntu:latest           1.2s
 => [internal] load build context                                          0.0s
 => => transferring context: 16.56kB                                       0.0s
 => [  1/107] FROM docker.io/library/ubuntu:latest@sha256:4b1d0c4a2d2aaf6  0.0s
 => CACHED [  2/107] RUN apt-get update                                    0.0s
 => CACHED [  3/107] RUN apt-get -yq dist-upgrade                          0.0s
 => CACHED [  4/107] RUN apt-get update                                    0.0s
 => CACHED [  5/107] RUN apt-get -yq dist-upgrade                          0.0s
 => ERROR [  6/107] RUN apt-get install -yq --no-install-recommends apt-u  1.1s
------                                                                          
 > [  6/107] RUN apt-get install -yq --no-install-recommends apt-utils build-essential bzip2 ca-certificates cmake coreutils curl emacs  emacs nano vim fonts-liberation gettext gfortran git git-all git-flow git-lfs gnupg gpg gpg-agent gzip hdf5-tools libcurl4-openssl-dev libgconf-2-4 libgtk2.0-0 libnss3 libpgf-dev libpgf6 libpgf6-dbg libpng-dev libssl-dev libxss1 libxtst6 locales lsb-release m4 nano openssh-client openssl pdf2svg poppler-utils qt5-default screen sudo texlive-binaries texlive-latex-base texlive-latex-extra texlive-luatex texlive-pictures tmux  tree unzip vim wget xdg-utils zip zlib1g-dev:
#9 0.256 Reading package lists...
#9 0.970 Building dependency tree...
#9 1.118 Reading state information...
#9 1.122 Package qt5-default is not available, but is referred to by another package.
#9 1.122 This may mean that the package is missing, has been obsoleted, or
#9 1.122 is only available from another source
#9 1.122 
#9 1.129 E: Package 'qt5-default' has no installation candidate
------
executor failed running [/bin/sh -c apt-get install -yq --no-install-recommends apt-utils build-essential bzip2 ca-certificates cmake coreutils curl emacs  emacs nano vim fonts-liberation gettext gfortran git git-all git-flow git-lfs gnupg gpg gpg-agent gzip hdf5-tools libcurl4-openssl-dev libgconf-2-4 libgtk2.0-0 libnss3 libpgf-dev libpgf6 libpgf6-dbg libpng-dev libssl-dev libxss1 libxtst6 locales lsb-release m4 nano openssh-client openssl pdf2svg poppler-utils qt5-default screen sudo texlive-binaries texlive-latex-base texlive-latex-extra texlive-luatex texlive-pictures tmux  tree unzip vim wget xdg-utils zip zlib1g-dev]: exit code: 100
ERROR: failed process: Process(`docker build -t my_image_name .`, ProcessExited(1)) [1]

Stacktrace:
 [1] pipeline_error
   @ ./process.jl:531 [inlined]
 [2] run(::Cmd; wait::Bool)
   @ Base ./process.jl:446
 [3] run(::Cmd)
   @ Base ./process.jl:444
 [4] top-level scope
   @ REPL[9]:1

Do you have any idea what I could do to fix this?

@WilliamZimmerman83
Copy link

+1 on this I get the same error.

@vanandrew
Copy link

vanandrew commented Apr 20, 2023

This seems to be an issue with the ubuntu:latest base image being used. Past Ubuntu 21, the qt5-default package no longer exists.

While we wait for the maintainers to fix the issue, there are two workarounds that I've managed to get working:

  1. Explicitly set the base image to ubuntu:20.04 in the generated Dockerfile:
FROM ubuntu:20.04  # <-- change the very first line
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update

You can also set this in on the create_dockerfile function with the parent_image argument

  1. Replace qt5-default with the packages that are explicitly installed during the apt-get install step:
# I've replaced qt5-default with qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools
RUN apt-get install -yq --no-install-recommends apt-utils build-essential bzip2 ca-certificates cmake coreutils curl emacs  emacs nano vim fonts-liberation gettext gfortran git git-all git-flow git-lfs gnupg gpg gpg-agent gzip hdf5-tools libcurl4-openssl-dev libgconf-2-4 libgtk2.0-0 libnss3 libpgf-dev libpgf6 libpgf6-dbg libpng-dev libssl-dev libxss1 libxtst6 locales lsb-release m4 nano openssh-client openssl pdf2svg poppler-utils qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools screen sudo texlive-binaries texlive-latex-base texlive-latex-extra texlive-luatex texlive-pictures tmux  tree unzip vim wget xdg-utils zip zlib1g-dev 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants