I'm trying to do this:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
And getting:
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 11, in <module>
from softwareproperties.SoftwareProperties import SoftwareProperties, shortcut_handler
File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 28, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
OK, like here, I'm removing and reinstalling python-apt and python3-apt, but then I get:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
sudo: add-apt-repository: command not found
Like here, I do:
sudo apt-get install software-properties-common
But then I get the same issue as the first one: ModuleNotFoundError: No module named 'apt_pkg'
and it all starts over. What should I do?
sudo apt update
andsudo apt full-upgrade
work at all? I dunno what your terminal is on about sayingadd-apt-repository
is an unknown command. sounds like something's very broken at a sytem level. – tatsu Jun 06 '19 at 09:39