I am unable to add ondrej to my Ubuntu 20.04 installation.
sudo add-apt-repository ppa:ondrej/php
The above command returns the following error
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 363, in <module>
addaptrepo = AddAptRepository()
File "/usr/bin/add-apt-repository", line 41, in __init__
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 91, in get_sources
raise NoDistroTemplateException(
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Ubuntu/focal
Following is the LSB release information.
Distributor ID: Ubuntu
Description:Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
Am I doing anything wrong?
End goal: I want to be able to install PHP 8.1 extensions from apt
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.3 LTS"
apt-cache policy -> https://pastebin.com/84HauP14
aptitude search ~o -> https://pastebin.com/VhaW9qWq
namei /etc/os-release -> https://pastebin.com/XwjZHkKa
cat /etc/os-release -> https://pastebin.com/CywsZvEh
sudo apt-get update; sudo apt-get install --reinstall libpython3-stdlib libpython3.8-minimal libpython3.8-stdlib python-apt-common python3 python3-apt python3-certifi python3-chardet python3-dbus python3-distro-info python3-gi python3-idna python3-minimal python3-pkg-resources python3-requests python3-requests-unixsocket python3-six python3-software-properties python3-urllib3 python3.8 python3.8-minimal software-properties-common
and then runsudo add-apt-repository ppa:ondrej/php
again. – N0rbert Feb 17 '22 at 08:23cat /etc/lsb-release
. See also: https://askubuntu.com/questions/49040/apt-could-not-find-a-distribution-template-error/ – pLumo Feb 17 '22 at 08:25apt-cache policy
andaptitude search ~o
to the pastebin and share link. – N0rbert Feb 17 '22 at 08:48namei /etc/os-release
please. It reminds me on this https://askubuntu.com/questions/1190336/software-properties-gtk-crashes-on-startup-19-10/1190636#1190636 – nobody Feb 17 '22 at 12:30cat /etc/os-release
Please [edit] your question for output; it is hard to read in comments without codeblock. – nobody Feb 17 '22 at 12:39LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
– abu-ahmed al-khatiri Feb 18 '22 at 08:59