PDA

View Full Version : Adding PPA - Not working



Googles94
2013-03-17, 23:42
I have been trying for hours to get apt-add-repository to work properly but had no success adding different ppas. (installed python-software-properties). I always get the following error:

Exception:

Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 160, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 96, in __init__
self.reload_sourceslist()
File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 584, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python2.7/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


Already spotted the exact same problem @kali linux bug report page. Maybe somebody got an solution

altjx
2013-03-25, 20:31
Please let me know if you ever get this working.

I was also trying to figure out how to do this. People keep referring to the /etc/apt/sources.list file, but this does not explain to me how to add "ppa:<whatever>" . Several guides out there, especially when looking at linux theme sites, refer to "add-apt-repository ppa:<something>" but even after installing python libraries and stuff, the error you provided is the same thing I get when trying to use the command.

2013-04-14, 17:45
Please let me know if you ever get this working.

I was also trying to figure out how to do this. People keep referring to the /etc/apt/sources.list file, but this does not explain to me how to add "ppa:<whatever>" . Several guides out there, especially when looking at linux theme sites, refer to "add-apt-repository ppa:<something>" but even after installing python libraries and stuff, the error you provided is the same thing I get when trying to use the command.

I am versed in cli; and linux for that matter... but I have ran into the same error.

##
apt-add-repository ppa:rumpshake/boomboom/zoomzoom
You are about to add the following PPA to your system:

More info: https://launchpad.net/lookintothehole/which/thebrown/
Press [ENTER] to continue or ctrl-c to cancel adding it

Traceback (most recent call last):
File "/usr/bin/apt-add-repository", line 160, in <module>
sp = SoftwareProperties(options=options)
File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 96, in __init__
self.reload_sourceslist()
File "/usr/lib/python2.7/dist-packages/softwareproperties/SoftwareProperties.py", line 584, in reload_sourceslist
self.distro.get_sources(self.sourceslist)
File "/usr/lib/python2.7/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
##

A moth in the wires...?

plsno
2016-10-18, 06:45
I had the same issue described above after downloading an unofficial apt-add-repository script (I have software-properties-common installed as well);

sudo apt-add-repository ppa:cactus/alsocactus

Traceback (most recent call last):
File "/usr/bin/apt-add-repository", line 95, in <module>
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 Kali/kali-rolling

To fix my issue I double checked that the apt-add-repository script was configured correctly and had execute permissions in /usr/sbin/
(# chmod +x apt-add-repository)

then removed lsb-release and updated

# gksudo gedit /etc/lsb-release
# rm /etc/lsb-release

# apt-get update