Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Whenever I try to add a repository I get a NoDistroTemplate Exception. I am using Linux Mint 14 Nadia.

tusharmakkar08@tusharmakkar08-Satellite-C660 ~ $  sudo add-apt-repository ppa:webupd8team/java 

You are about to add the following PPA to your system:
 Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK6 / JDK7 / JDK8). 
 There are no actual Java files in this PPA. 
 More info: http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
 More info: https://launchpad.net/~webupd8team/+archive/java
Press [ENTER] to continue or ctrl-c to cancel adding it
Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 161, in <module>
    sp = SoftwareProperties(options=options)
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 104, in __init__
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 592, in reload_sourceslist
  File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 87, in get_sources
    raise NoDistroTemplateException("Error: could not find a "
aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template

How to remove this exception ?

share|improve this question
up vote 2 down vote accepted

I think the error is pretty self explanatory. The PPA you're attempting to add does not provide packages for your particular version/release of Mint. At least not at the PPA level, even though the packages may be completely compatible.

Take a look at this Q&A on askubuntu, specifically this answer.

There is a solution that you can try but it isn't really the recommended approach for dealing with this particular issue:

excerpt from this forum post:

The error regarding distribution template is refering to the file "/etc/lsb-release" It should read something like...


The ubuntu version depends on the version of mint you are using. You should be able to change the DISTRIB_DESCRIPTION to change the name of the OS during grub boot but you can't change the rest without breaking the source.list distribution template.

share|improve this answer
So what do you recommend ? Should I change "/etc/lsb-release" file ? – Tushar Makkar Apr 28 '13 at 14:01
You could try that but I'd make a copy of the lsb-release file prior to trying it. – slm Apr 28 '13 at 14:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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