Running sudo apt-add-repository returns sudo: "apt-add-repository: command not found"
Following the instructions at https://support.system76.com/articles/system76-driver/ i ran the following on my brand new System76, PopOS-running Oryx machine, and got a rather unexpected error:
$ sudo apt-add-repository -y ppa:system76-dev/stable
sudo: apt-add-repository: command not found
Very strange. I definitely had internet, and it said simply the command wasn’t found, so it wouldn’t be a connection issue. Elsewhere i’ve seen references to an add-apt-repository
command, and i tried that, just the command alone to see if i had it, and it said must run as root. But then i tried the original “apt-add-repository” command (with sudo) and it worked.
Maybe running add-apt-repository
(not as root) triggered a registration of the alias apt-add-repository
, so the sudo command worked on the second time.
(Note: Usually when this problem comes up, the solution is to sudo apt-get install software-properties-common
but that wasn’t the case for me.)