Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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:
 More info:
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/", line 104, in __init__
  File "/usr/lib/python3/dist-packages/softwareproperties/", line 592, in reload_sourceslist
  File "/usr/lib/python3/dist-packages/aptsources/", 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

1 Answer 1

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.