How to Install Podman 3.4.2 on Debian 11 via openSUSE Repository

How to Install Podman 3.4.2 on Debian 11 via openSUSE Repository

Overview

In environments running Debian 11, the official package repositories often do not include Podman version 3.4.2. If you are operating on a Debian 11 server or virtual machine and require this specific version for compatibility or feature requirements, this guide will walk you through installing it using the third-party openSUSE libcontainers repository. It also covers binding the GPG key properly to prevent NO_PUBKEY errors.

What You'll Need

  • Hardware
    • 1 × EG series gateway (e.g., EG5101 or EG51xx)
  • Software
    • Debian 11 operating system
    • RobustOS Pro
  • Prerequisites
    • Root or sudo privileges on the device
    • It is recommended to back up any existing container configurations before making changes to the container engine to avoid unexpected data loss or service disruption.

Step-by-Step Configuration Guide

Phase 1: System Preparation and Cleanup

  1. Install Base Tools: Update your software sources and install the necessary dependencies for adding new repositories.
      sudo apt update
      sudo apt install -y curl gpg ca-certificates
  1. Clear Old Repository Configurations: If you have attempted to configure this repository before, remove the old configuration files and keys to prevent conflicts.
      sudo rm -f /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
      sudo rm -f /usr/share/keyrings/devel_kubic_libcontainers_stable.gpg

Phase 2: Add the Third-Party Repository

  1. Import the Repository GPG Key: Download and save the repository signature key securely.
      curl -fsSL https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/Release.key \
       | gpg --dearmor \
       | sudo tee /usr/share/keyrings/devel_kubic_libcontainers_stable.gpg > /dev/null

Note: You can verify the key was generated successfully by running ls -l /usr/share/keyrings/devel_kubic_libcontainers_stable.gpg.
4. Add the Podman Repository: Write the repository into your APT configuration, explicitly specifying the key imported in the previous step using the signed-by method.

      echo "deb [signed-by=/usr/share/keyrings/devel_kubic_libcontainers_stable.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/ /" \
      | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list

Phase 3: Install Podman

  1. Update APT Index: Refresh your package lists to include the new repository.
      sudo apt update

(If there are no GPG errors, the repository is configured correctly.)
6. Check Available Podman Versions: Verify that version 3.4.2 is now available in your APT policies.

      apt policy podman
  1. Install the Specific Version: Install Podman 3.4.2 from the repository.
      sudo apt install -y podman=100:3.4.2*

If you plan to run containers as a non-root user (rootless mode), you need to configure specific dependencies. For more background on rootless containers, refer to the Podman Rootless Tutorial.

  1. Install Rootless Dependencies:
      sudo apt install -y uidmap slirp4netns fuse-overlayfs

  1. Configure SubUIDs and SubGIDs: Check if your current user has mapped IDs.
      cat /etc/subuid
      cat /etc/subgid

If your username is missing from the output, add it by executing:

      echo "$USER:100000:65536" | sudo tee -a /etc/subuid
      echo "$USER:100000:65536" | sudo tee -a /etc/subgid


Verification & Testing

To confirm your configuration is successful, check the installed version and system information.

  1. Run the version command:
      podman --version
  1. Expected Result: The system should successfully output your installed version.



  1. To ensure the container engine is functioning properly, view the detailed runtime state:
      podman info


Troubleshooting / FAQ

Q: I am receiving a NO_PUBKEY error when running apt update. How do I fix this?
A: This usually means the system is using an older, unauthenticated list file. Repeat Step 2 to delete the .list and .gpg files, then carefully rerun Step 3 and Step 4 to ensure the signed-by attribute correctly points to the newly downloaded GPG key.

Q: Is there an automated, one-click script to do all of this?
A: Yes. If you prefer to run the setup automatically, you can copy and paste the following bash script:

sudo apt update
sudo apt install -y curl gpg ca-certificates

sudo rm -f /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
sudo rm -f /usr/share/keyrings/devel_kubic_libcontainers_stable.gpg

curl -fsSL https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/Release.key \
| gpg --dearmor \
| sudo tee /usr/share/keyrings/devel_kubic_libcontainers_stable.gpg > /dev/null

echo "deb [signed-by=/usr/share/keyrings/devel_kubic_libcontainers_stable.gpg] https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list

sudo apt update
sudo apt install -y podman=3.4.2*
podman --version

Q: How do I completely uninstall this specific Podman version and remove the repository?
A: If you no longer need Podman or this repository, run the following commands sequentially:

# Uninstall Podman
sudo apt remove -y podman

# Remove third-party repository and keys
sudo rm -f /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
sudo rm -f /usr/share/keyrings/devel_kubic_libcontainers_stable.gpg

# Update APT lists
sudo apt update


Conclusion

By following these steps, you have bypassed the default Debian 11 limitations and successfully deployed Podman 3.4.2. Utilizing the signed-by repository method ensures your package management remains secure and free of GPG warnings moving forward.


Revision History

VersionDateAuthorChanges
1.02026-06-12HuberyInitial document creation.

    • Related Articles

    • How to Install Grafana on Debian 11

      To install Grafana on Debian 11, follow the steps below. Grafana provides its own APT repository for Debian-based distributions, which ensures you get the latest version. This guide will show you how to install Grafana from the official repository. ...
    • How to Install Docker on Robustel EG Series Gateways via Debian Package Manager

      ? Overview This document outlines the procedures for installing the Docker Engine on Robustel EG series edge computing gateways (running RobustOS Pro). By leveraging the device's Debian-based architecture, users can configure official Docker ...
    • Debian-Based Application Development Guide

      1. Overview 1.1. Target Audience and Use Cases This guide is designed for developers who want to build applications directly on the Debian system underlying RobustOS Pro devices. Compared to using the RobustOS Pro application framework, developing ...
    • How to install Home Assistant via Docker and download the necessary components

      ? Overview This document provides a comprehensive guide on how to install Home Assistant using a Docker container on Robustel Edge Gateways (EG Series) running RobustOS Pro. Additionally, it covers the necessary steps to download and configure the ...
    • How to Install Node-RED on EG Series Devices via Docker?

      ? Overview This document outlines the procedure for deploying Node-RED on Robustel EG Series Edge Gateways. Node-RED is a flow-based programming tool, originally developed by IBM, which allows for visual programming to wire together hardware ...