0

I tried running the following command to set up a stable repository while installing Docker on my Ubuntu 18.04 server

    sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable

I get the following error

ModuleNotFoundError: No module named 'apt_pkg'

How do I fix this?

Leman Kirme
  • 101
  • 2

1 Answers1

0

It's because you are missing the os package python-apt, install it via the following commands

 apt-get update 
 apt-get install python-apt

Please follow the official documentation for the install of the docker for a clean install https://docs.docker.com/engine/install/ubuntu/