Skip to main content

[SOLVED] Linux - Issues installing Docker on Ubuntu - libseccomp2 version 2.3.1 installed but 2.4 required


This article has been improved for a better understanding - goto https://splashcoder.blogspot.com/2023/07/installing-docker-on-ubuntu-1804-solved.html


There is a possibility that you are trying to install docker. There is a very comprehensive guide at https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository.

The linked guide serves as a reference for this article. We try to address the common errors in this article. Just so you won’t have to scour the entire answers on StackOverflow.

Step 1: The first thing is to run our famous "apt update" command. So run the command below.

sudo apt-get update

You may observe that there are some errors. And YES! we are using a fairly old Ubuntu 18.04 Bionic Beaver Release. It seems perfect for this as most people have issues installing docker anyways. To resolve this, you may refer to Configure DNS server IP to resolve errors with apt-get update

Step 2: Following the Docker article, we should run the commands below.

sudo apt-get install \

    ca-certificates \

    curl \

    gnupg \

    lsb-release

This may take some time, we hope it gets completed without any errors.

Step 3: Now we may Add Docker’s official GPG key:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Step 4: Now, we should add Docker’s repository (PPA) to our apt sources like below.

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null


We have fared well till now. 


Step 5: After adding new PPA to our apt sources, we should run sudo apt-get update. That's why the next command is apt-get update

sudo apt-get update

Step 6: Now, we run another command to install docker and its main components

sudo apt-get install docker-ce docker-ce-cli containerd.io

Now, there is a high chance we come across the famous error as seen below.

containerd.io : Depends: libseccomp2 (>= 2.4.0) but 2.3.1-2.1ubuntu4 is to be installed

This means that Ubuntu has checked all apt sources(PPA) and cannot find the libseccomp2 version greater than 2.3.1, whilst Docker requires version 2.4 and above.

 

The easiest fix will take you one step closer to Linux internal workings. Remember that earlier in this article, we added docker’s source URL into our source's file. We will add another URL into our sources file. This new URL is the source file for another Linux distribution. The libseccopm2 package is compatible with Ubuntu 18.04 but the repositories have not been updated. Follow through, please.


Step 7: If you are a careful admin like me, you will want to create a backup of the apt sources before these steps.

sudo cp /etc/apt/sources.list /etc/apt/bkup_20210104_sources.list_bkup

You can also run the query below to see the current source URLs present on your server.

grep -v '#' /etc/apt/sources.list

 

Step 8: Next we have to edit the source.list file. You can use my method below.

sudo -s
echo -e "deb http://security.ubuntu.com/ubuntu xenial-security main" >> /etc/apt/sources.list
exit

You can run the command below to check if the new source URL was added successfully.


Step 9: Now that we have updated the apt’s source file. We must run the apt update command once again.

You can already see at this point that the repository is being updated using the new URL which was just added.

Step 10: we can repeat the failed step from Docker install command, and we should have a trouble-free install. Cheers!

The next step is to verify that Docker Engine is installed correctly by running the hello-world image. You may use the command below or return to the main docker instruction manual at https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository.


Did you get another error that stopped you from installing docker, kindly reach out, I will be grateful to share your experience and help to solve it to the best of my ability.


Cheers! See you later in another wonderful Linux/System Admin episode.


Comments

Popular Articles

Installing Docker on Ubuntu 18.04 ([SOLVED]- libseccomp2 version 2.3.1 installed but 2.4 required)

 Introduction: If you're attempting to install Docker on Ubuntu 18.04 Bionic Beaver, which is known for having installation issues, this comprehensive guide aims to address common errors you may encounter during the process. Our goal is to save you time searching for answers on StackOverflow by providing clear instructions. The guide is based on the official Docker documentation available at https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository. Step 1: Updating Package Lists To begin, run the following command to update your package lists using the "apt-get update" command: sudo apt-get update Note: If you encounter any errors during the update process, it may be due to the older Ubuntu 18.04 release. In such cases, you can refer to the Configure DNS server IP to resolve errors with apt-get update  guide for assistance. This guide will help you address any DNS-related issues that might be preventing successful updates. Step 2: Installing Dependencie...

Is this a CSS Bug: setting Background and z-index for Pseudo selectors(::before & :: after)

Recently I was making some UI for a friend's project. We had this CSS button effect that works elsewhere but failed to work at the desired location. Upon troubleshooting, we discovered that if the parent element has a background defined, you can't control the z-index of the pseudo selection of any of its children. Wait for it, I have got some demo. TL;DR set background colour or image for a " DIV.parent ", create a " Div.child " inside the " DIV.parent ". use CSS to modify the " ::before" " element of the " Div.child " as follows; set position as absolute, content as an empty string, height:100% and width is best at 50% for example purposes, lastly, give it a background colour. You will observe that the " ::before" " element is overlaying the actual element's content. Try to adjust the z-index of the " ::before" ". You will also realize that the z-index works fine if we remove the backgroun...

Linux - How many network cards/interfaces do I have and what's their IP

 Yup! You have your Linux server or desktop installed, you have been enjoying this setup and suddenly you need to know how many network adapters are installed. You probably also want to know which of these adapters is connected to the internet, please follow through. First, you should run the command below on the terminal ip addr TL; DR: T here are 2 network adapters here,  “enp0s3” is my internet network adapter because it has an IP address from my internet gateway/router/MiFi. The IP address pattern gives this information.it begins with 192.x.x.x. Also "epn0s8" is the local network adapter which allows connections within an ethernet,  This output is quite verbose. Let’s dissect it in a bit. Firstly, we can observe items 1, 2 and 3. It is worth mentioning that item 1 is not an adapter, it is synonymous with the local network. Item 1 is labelled as “lo:”, this means that details in this section have to do with your localhost. Internal network setting of your system. This ...