2

Whenever i try to add any PPA it shows me the following error

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 91, in 
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__
    self.reload_sourceslist()
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist
    self.distro.get_sources(self.sourceslist)    
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources
    (self.id, self.codename))
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Ubuntu/n/a`` 

Output of cat /etc/lsb-release (editing it to elementary-os did not solve the problem)

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"
Output of cat /etc/os-release

$ cat /etc/os-release
NAME="Ubuntu"
VERSION="14.04.4 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.4 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"

Solution at "could not find a distribution template for Ubuntu/n/a" error in elementary OS does not solve my problem.

2
  • i have the same issue! did you already solved?
    – user4893
    Apr 29, 2016 at 6:32
  • The error code from the issue appears identical to the discussion you linked. If it's different, would you please explain what didn't work from the existing answer?
    – wolf
    Oct 3, 2016 at 1:59

1 Answer 1

1

That line 91 line 109 ordeal was a bug. Most of the tickets I found in Launchpad (the bug tracker) went ultimately unresolved, but perhaps they just weren't the main ticket.

Have you tried updating your system and installing "Software & Updates" to install the PPA manually?

sudo apt update
sudo apt upgrade
sudo apt install software-properties-gtk 

Has the problem been resolved and does it persist into your Loki upgrade?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.