Score:0

Resolve APT package conflicts

ar flag

I am running a machine with Ubuntu Server 22.04. I have installed CRI-O following the install section on GitHub. It adds a repository for CRI-O with all the required dependencies. With only CRI-O installed everything works fine.

One of the dependencies is the containers-common package. Now if I try to install podman from the official repositories I get a package conflict. Podman in the official repositories installs golang-github-containers-common, which tries to install the same files as the containers-common package from the other repository.

Preferably I want to keep the container-commmon package from the CRI-O repository as it is newer. What is the best solution here? Do I have to package podman on my own? Or can I somehow mark golang-github-containers-common as a ignored dependency?

At the moment I just removed the broken dependency from /var/lib/dpkg/status as suggested here, but this seems like a hacky solution.

Edit: To recreate the issue I removed podman and installed podman again. This is the full output of apt:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  buildah catatonit containernetworking-plugins criu crun fuse-overlayfs golang-github-containernetworking-plugin-dnsname
  libflashrom1 libftdi1-2 libostree-1-1 libyajl2 slirp4netns uidmap
The following packages were automatically installed and are no longer required:
  libflashrom1 libftdi1-2
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  golang-github-containers-common golang-github-containers-image
Suggested packages:
  containers-storage docker-compose
The following NEW packages will be installed:
  golang-github-containers-common golang-github-containers-image podman
0 upgraded, 3 newly installed, 0 to remove and 57 not upgraded.
Need to get 0 B/10,4 MB of archives.
After this operation, 38,2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
(Reading database ... 183358 files and directories currently installed.)
Preparing to unpack .../golang-github-containers-image_5.16.0-3_all.deb ...
Unpacking golang-github-containers-image (5.16.0-3) ...
dpkg: error processing archive /var/cache/apt/archives/golang-github-containers-image_5.16.0-3_all.deb (--unpack):
 trying to overwrite '/etc/containers/registries.conf', which is also in package containers-common 100:1-22
Preparing to unpack .../golang-github-containers-common_0.44.4+ds1-1_all.deb ...
Unpacking golang-github-containers-common (0.44.4+ds1-1) ...
dpkg: error processing archive /var/cache/apt/archives/golang-github-containers-common_0.44.4+ds1-1_all.deb (--unpack):
 trying to overwrite '/etc/containers/policy.json', which is also in package containers-common 100:1-22
Selecting previously unselected package podman.
Preparing to unpack .../podman_3.4.4+ds1-1ubuntu1_amd64.deb ...
Unpacking podman (3.4.4+ds1-1ubuntu1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/golang-github-containers-image_5.16.0-3_all.deb
 /var/cache/apt/archives/golang-github-containers-common_0.44.4+ds1-1_all.deb
Rishon JR avatar
pl flag
try doing `sudo add-apt-repository universe && sudo apt update` and try reinstalling again.
Rishon JR avatar
pl flag
Please include the output of what APT shows.
Garuno avatar
ar flag
@RishonJR I added the output of apt.
Garuno avatar
ar flag
@RishonJR I also tried to your solution, but it doesn't work. I also don't know why adding the universe repository would solve anything.
Rishon JR avatar
pl flag
certain dependencies are from the ubuntu repositories like `universe` which is not added by default.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.