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 update failure on Ubuntu 20.04 #9345

Closed
zgoda opened this issue Feb 12, 2021 · 21 comments
Closed

Package update failure on Ubuntu 20.04 #9345

zgoda opened this issue Feb 12, 2021 · 21 comments
Assignees
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. Packaging Bug is in a Podman package

Comments

@zgoda
Copy link

zgoda commented Feb 12, 2021

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

On Ubuntu 20.04 update fails with dpkg error

Steps to reproduce the issue:

  1. sudo apt update

  2. sudo apt upgrade

Describe the results you received:

$ LANG=C sudo apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 buildah : Depends: containers-common (>= 100:1-7) but 1.2.1~2 is installed
 podman : Depends: containers-common (>= 100:1-7) but 1.2.1~2 is installed
 skopeo : Depends: containers-common (>= 100:1-7) but 1.2.1~2 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
$ LANG=C sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  containers-golang containers-image varlink
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  containers-common
The following packages will be upgraded:
  containers-common
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
Need to get 0 B/44,8 kB of archives.
After this operation, 34,8 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 281752 files and directories currently installed.)
Preparing to unpack .../containers-common_100%3a1-7_all.deb ...
Unpacking containers-common (100:1-7) over (1.2.1~2) ...
dpkg: error processing archive /var/cache/apt/archives/containers-common_100%3a1-7_all.deb (--unpack):
 trying to overwrite '/usr/share/man/man5/containers-auth.json.5.gz', which is also in package containers-image 5.8.1~1
Errors were encountered while processing:
 /var/cache/apt/archives/containers-common_100%3a1-7_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Describe the results you expected:

Packages gets updated.

Output of podman version:

$ podman version
Version:      3.0.0
API Version:  3.0.0
Go Version:   go1.15.2
Built:        Thu Jan  1 01:00:00 1970
OS/Arch:      linux/amd64

Output of podman info --debug:

host:
  arch: amd64
  buildahVersion: 1.19.2
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: 'conmon: /usr/libexec/podman/conmon'
    path: /usr/libexec/podman/conmon
    version: 'conmon version 2.0.26, commit: '
  cpus: 8
  distribution:
    distribution: ubuntu
    version: "20.04"
  eventLogger: journald
  hostname: bekon
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1000
      size: 1
    - container_id: 1
      host_id: 100000
      size: 65536
  kernel: 5.4.0-65-generic
  linkmode: dynamic
  memFree: 13355417600
  memTotal: 31503855616
  ociRuntime:
    name: crun
    package: 'crun: /usr/bin/crun'
    path: /usr/bin/crun
    version: |-
      crun version 0.17.6-58ef-dirty
      commit: fd582c529489c0738e7039cbc036781d1d039014
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
  os: linux
  remoteSocket:
    path: /run/user/1000/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_AUDIT_WRITE,CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_MKNOD,CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    selinuxEnabled: false
  slirp4netns:
    executable: /usr/bin/slirp4netns
    package: 'slirp4netns: /usr/bin/slirp4netns'
    version: |-
      slirp4netns version 1.1.8
      commit: unknown
      libslirp: 4.3.1-git
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.4.3
  swapFree: 2147479552
  swapTotal: 2147479552
  uptime: 8h 28m 12.77s (Approximately 0.33 days)
registries:
  search:
  - docker.io
  - quay.io
store:
  configFile: /home/jarek/.config/containers/storage.conf
  containerStore:
    number: 0
    paused: 0
    running: 0
    stopped: 0
  graphDriverName: overlay
  graphOptions:
    overlay.mount_program:
      Executable: /usr/bin/fuse-overlayfs
      Package: 'fuse-overlayfs: /usr/bin/fuse-overlayfs'
      Version: |-
        fusermount3 version: 3.9.0
        fuse-overlayfs: version 1.4
        FUSE library version 3.9.0
        using FUSE kernel interface version 7.31
  graphRoot: /home/jarek/.local/share/containers/storage
  graphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "false"
    Supports d_type: "true"
    Using metacopy: "false"
  imageStore:
    number: 21
  runRoot: /run/user/1000/containers
  volumePath: /home/jarek/.local/share/containers/storage/volumes
version:
  APIVersion: 3.0.0
  Built: 0
  BuiltTime: Thu Jan  1 01:00:00 1970
  GitCommit: ""
  GoVersion: go1.15.2
  OsArch: linux/amd64
  Version: 3.0.0

Package info (e.g. output of rpm -q podman or apt list podman):

podman/unknown,now 100:3.0.0-1 amd64 [installed]
podman/unknown 100:3.0.0-1 arm64
podman/unknown 2.2.1~4 armhf
podman/unknown 100:3.0.0-1 s390x

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

Physical machine.

@openshift-ci-robot openshift-ci-robot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 12, 2021
@vrothberg
Copy link
Member

Thanks for reaching out! @lsm5 PTAL

@rokat
Copy link

rokat commented Feb 12, 2021

Hello after removing the package containers-image

By doing

sudo apt remove containers-image podman

And re-installing it word as a charm

Because it tries to replace

 /usr/share/man/man5/containers-auth.json.5.gz

Which is already owned by containers-image , in my opinion package-conflict issue perhaps

Good luck ! (eager to test podman3 and remove podman-compose from pip ^^)

@scotticles
Copy link

This happened to me on two machines, had to completely remove podman and then install podman, which is fine but i have production servers with podman...and not really wanted to remove and add to get podman v3. Hopefully a fix is on its way.

@asottile
Copy link
Contributor

for me the workaround was:

sudo apt purge podman-rootless buildah
sudo apt autoremove --purge
sudo apt install podman-rootless buildah

@buck2202
Copy link

buck2202 commented Feb 14, 2021

Probably goes without saying, but this affects 18.04 as well. containers-image was previously a dependency of containers-common, but containers-common is now listed without dependencies. They don't seem able to coexist in their current state.

Output from an un-updated system:

$ apt show -a containers-common
Package: containers-common
Version: 100:1-7
Priority: optional
Section: devel
Maintainer: Lokesh Mandvekar <[email protected]>
Installed-Size: 102 kB
Provides: skopeo-containers
Conflicts: skopeo-containers
Replaces: skopeo-containers
Homepage: https://github.com/projectatomic/skopeo
Download-Size: 44.8 kB
APT-Sources: http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04  Packages
Description: Configuration files for working with image signatures.

Package: containers-common
Version: 1.2.1~2
Status: install ok installed
Priority: optional
Section: devel
Source: skopeo
Maintainer: Lokesh Mandvekar <[email protected]>
Installed-Size: 68.6 kB
Provides: skopeo-containers
Depends: containers-golang, containers-image (>= 5.8.0~1)
Conflicts: skopeo-containers
Replaces: skopeo-containers
Homepage: https://github.com/projectatomic/skopeo
Download-Size: unknown
APT-Manual-Installed: yes
APT-Sources: /var/lib/dpkg/status
Description: Configuration files for working with image signatures.

@asciiprod
Copy link

If containers-image is obsolete, it must be added to the control file of containers-common in the Replaces line.

@dimon222
Copy link

Same issue is affecting entire Debian tree (not just Ubuntu)

@lsm5 lsm5 added In Progress This issue is actively being worked by the assignee, please do not work on this at this time. Packaging Bug is in a Podman package labels Feb 16, 2021
@lsm5
Copy link
Member

lsm5 commented Feb 16, 2021

sent containers-common_1-8 to OBS just now which should replace the older dependencies. I'll fix podman and the rest to use this minimum containers-common dependency as well, but hopefully manually upgrading containers-common should handle things for now.

Thanks @asciiprod

@lsm5
Copy link
Member

lsm5 commented Feb 16, 2021

podman 3.0.0-2 should use containers-common 100:1-8, currently building at https://build.opensuse.org/package/show/devel:kubic:libcontainers:stable/podman .

@lsm5
Copy link
Member

lsm5 commented Feb 16, 2021

Closing as the builds have landed on the repo. Please reopen if the issue persists.

@lsm5 lsm5 closed this as completed Feb 16, 2021
@lsm5
Copy link
Member

lsm5 commented Feb 16, 2021

There might be an issue with registries.conf. Looking ...

@lsm5 lsm5 reopened this Feb 16, 2021
@lsm5
Copy link
Member

lsm5 commented Feb 16, 2021

Should be fixed with podman 100:3.0.0-3. Building on OBS atm: https://build.opensuse.org/package/show/devel:kubic:libcontainers:stable/podman . Will be available hopefully in an hour or less.

I'll keep the bug open for now. Please close it if this resolves your issue.

@asciiprod
Copy link

Upgrade now works without conflicts.
But configuration directories are now a bit redundant/confusing. There is a new /etc/containers/registries.conf.d as well as a /etc/containers/registries.d in containers-common with shortnames.conf moved to the new directory. In 2.x this was all in registries.d. Is there any distinction between the two directories?
Neither the manpage nor the registries.confstate how and that these directories are included.

@vrothberg
Copy link
Member

Yes, the two directories are different. registries.conf.d is the one for drop-in config files for the registries.conf.

@lsm5
Copy link
Member

lsm5 commented Feb 17, 2021

@vrothberg do we need a manpage update perhaps? I'm gonna close this, we can open a new bug for manpage change if need be.

@lsm5 lsm5 closed this as completed Feb 17, 2021
@vrothberg
Copy link
Member

@vrothberg do we need a manpage update perhaps? I'm gonna close this, we can open a new bug for manpage change if need be.

No changes needed. Both directories have man pages that go into detail.

@ghherlin
Copy link

Problem persists with v3.4.2 in KUbuntu 21.10 (Impish Indri);
apt-get -y install podman Reading package lists... Done Building dependency tree... Done Reading state information... Done The following packages were automatically installed and are no longer required: buildah golang-github-containernetworking-plugin-dnsname golang-github-containers-common golang-github-containers-image libostree-1-1 libslirp0 runc Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: containers-common The following NEW packages will be installed: containers-common podman 0 upgraded, 2 newly installed, 0 to remove and 1 not upgraded. Need to get 0 B/20,8 MB of archives. After this operation, 84,0 MB of additional disk space will be used. (Reading database ... 332265 files and directories currently installed.) Preparing to unpack .../containers-common_100%3a1-22_all.deb ... Unpacking containers-common (100:1-22) ... dpkg: error processing archive /var/cache/apt/archives/containers-common_100%3a1-22_all.deb (--unpack): trying to overwrite '/etc/containers/policy.json', which is also in package golang-github-containers-common 0.38.16+ds1-1ubuntu1 Selecting previously unselected package podman. Preparing to unpack .../podman_100%3a3.4.2-4_amd64.deb ... Unpacking podman (100:3.4.2-4) ... Errors were encountered while processing: /var/cache/apt/archives/containers-common_100%3a1-22_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
It seems to me that (at least) the file /etc/containers/policy.json is being sourced twice...

Trying a podman run ... yields the following error:
Error: open /etc/containers/policy.json: no such file or directory
It seems also that the installation is incomplete / aborted.

I'm stuck...

@lsm5
Copy link
Member

lsm5 commented Jun 27, 2022

@ghherlin podman is available on the default repos itself on 21.10. Best to use that.

@ghherlin
Copy link

ghherlin commented Jun 27, 2022 via email

@lsm5
Copy link
Member

lsm5 commented Jun 27, 2022

@ghherlin The images you probably attached via email aren't displaying for me. But anyway, if it's an issue with the official ubuntu package, then it's best reported to Ubuntu itself.

@ghherlin
Copy link

ghherlin commented Oct 11, 2022 via email

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
In Progress This issue is actively being worked by the assignee, please do not work on this at this time. kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. Packaging Bug is in a Podman package
Projects
None yet
Development

No branches or pull requests