PDA

View Full Version : Fail to add-apt-repo



kalinux
2013-03-25, 11:42
Hi there!

I'm getting an error from pyhton when i want to add an apt-repository.

I have already installed the package python-software-properties, but this is my terminal output:



root@kali:~# add-apt-repository ppa:danielrichter2007/grub-customizer
You are about to add the following PPA to your system:
This PPA contains the latest release of Grub Customizer.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
More info: https://launchpad.net/~danielrichter2007/+archive/grub-customizer
Press [ENTER] to continue or ctrl-c to cancel adding it

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


Anyone knows anyway to solve this? Thanks in advance! :D

j0s3
2013-04-14, 22:18
Hi there!

I'm getting an error from pyhton when i want to add an apt-repository.

I have already installed the package python-software-properties, but this is my terminal output:



root@kali:~# add-apt-repository ppa:danielrichter2007/grub-customizer
You are about to add the following PPA to your system:
This PPA contains the latest release of Grub Customizer.

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
More info: https://launchpad.net/~danielrichter2007/+archive/grub-customizer
Press [ENTER] to continue or ctrl-c to cancel adding it

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


Anyone knows anyway to solve this? Thanks in advance! :D

try this, and forgeret the other solutions :)

#create add-apt-repository
wget http://blog.anantshri.info/content/uploads/2010/09/add-apt-repository.sh.txt
cp add-apt-repository.sh.txt /usr/sbin/add-apt-repository
chmod o+x /usr/sbin/add-apt-repository
chown root:root /usr/sbin/add-apt-repository

enjoy it!

charonsecurity
2013-04-16, 05:38
I ended up building grubcustomizer from source, you may want to try that. Great program ;)