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

Unable to update apt cache #24

Open
MLNW opened this issue Dec 28, 2021 · 2 comments
Open

Unable to update apt cache #24

MLNW opened this issue Dec 28, 2021 · 2 comments

Comments

@MLNW
Copy link

MLNW commented Dec 28, 2021

For some reason, I am unable to update the apt cache with this docker image.
I tried it with ubuntu:latest where everything works fine.
Do you have an idea how to solve this?

❯ mol login                                                                                          13:22:28  
INFO     Running default > login
root@tinytex-ubuntu:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
  Couldn't create temporary file /tmp/apt.conf.7vCFS7 for passing config to apt-key
Get:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Err:2 http://archive.ubuntu.com/ubuntu focal-updates InRelease
  Couldn't create temporary file /tmp/apt.conf.n79pfd for passing config to apt-key
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
  Couldn't create temporary file /tmp/apt.conf.95a2eh for passing config to apt-key
Err:3 http://security.ubuntu.com/ubuntu focal-security InRelease
  Couldn't create temporary file /tmp/apt.conf.ardLfm for passing config to apt-key
Reading package lists... Done
W: GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: Couldn't create temporary file /tmp/apt.conf.7vCFS7 for passing config to apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu focal InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu focal-updates InRelease: Couldn't create temporary file /tmp/apt.conf.n79pfd for passing config to apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu focal-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu focal-backports InRelease: Couldn't create temporary file /tmp/apt.conf.95a2eh for passing config to apt-key
E: The repository 'http://archive.ubuntu.com/ubuntu focal-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: Couldn't create temporary file /tmp/apt.conf.ardLfm for passing config to apt-key
E: The repository 'http://security.ubuntu.com/ubuntu focal-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

My molecule.yml:

dependency:
  name: galaxy
driver:
  name: podman
platforms:
  #- name: tinytex-centos
  #  image: docker.io/geerlingguy/docker-centos8-ansible
  #  pre_build_image: true
  - name: tinytex-ubuntu
    image: docker.io/geerlingguy/docker-ubuntu2004-ansible
    pre_build_image: true
provisioner:
  name: ansible
verifier:
  name: ansible
@MLNW
Copy link
Author

MLNW commented Dec 28, 2021

I guess it might be related to #10 since I am using podman. But it still works with other images and your CentOS8 image works without issue.

loraine-gueguen added a commit to abims-sbr/ansible-sequenceserver that referenced this issue Aug 1, 2024
@loraine-gueguen
Copy link

loraine-gueguen commented Aug 2, 2024

Hi. I have had a similar error with image geerlingguy/docker-ubuntu2004-ansible:latest that I have fixed by adding a task for chmod 1777 /tmp

ok: [instance] => {
      "msg": {
          "changed": true,
          "cmd": "apt-get update && apt-get -y install apt-transport-https ca-certificates gnupg gpg-agent",
          "delta": "0:00:04.096494",
          "end": "2024-08-02 07:53:06.915538",
          "failed": false,
          "msg": "",
          "rc": 0,
          "start": "2024-08-02 07:53:02.819044",
          "stderr": "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: Couldn't create temporary file /tmp/apt.conf.6DJWwh for passing config to apt-key\nW: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: Couldn't create temporary file /tmp/apt.conf.Hc79Dm for passing config to apt-key\nW: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal-updates InRelease: Couldn't create temporary file /tmp/apt.conf.FQd78s for passing config to apt-key\nW: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.c/
          "stderr_lines": [
              "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://security.ubuntu.com/ubuntu focal-security InRelease: Couldn't create temporary file /tmp/apt.conf.6DJWwh for passing config to apt-key",
              "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal InRelease: Couldn't create temporary file /tmp/apt.conf.Hc79Dm for passing config to apt-key",
              "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal-updates InRelease: Couldn't create temporary file /tmp/apt.conf.FQd78s for passing config to apt-key",
              "W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://archive.ubuntu.com/ubuntu focal-backports InRelease: Couldn't create temporary file /tmp/apt.conf.W5JTZt for passing config to apt-key",
              "W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease  Couldn't create temporary file /tmp/apt.conf.Hc79Dm for passing config to apt-key",
              "W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Couldn't create temporary file /tmp/apt.conf.FQd78s for passing config to apt-key",
              "W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Couldn't create temporary file /tmp/apt.conf.W5JTZt for passing config to apt-key",
              "W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease  Couldn't create temporary file /tmp/apt.conf.6DJWwh for passing config to apt-key",
              "W: Some index files failed to download. They have been ignored, or old ones used instead.",
              "debconf: unable to initialize frontend: Dialog",
              "debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or without a controlling terminal.)",
              "debconf: falling back to frontend: Readline",
              "debconf: unable to initialize frontend: Readline",
              "debconf: (This frontend requires a controlling tty.)",
              "debconf: falling back to frontend: Teletype",
              "dpkg-preconfigure: unable to re-open stdin: "
          ],
[...]

full log: https://github.com/abims-sbr/ansible-sequenceserver/actions/runs/10212004094/job/28254439075#step:5:297

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

2 participants