Aggiungere repository PPA in Debian
Oggi ho installato BURG su Debian testing; per farlo ho divuto aggiungere un repo PPA.
Solo che il comando:
# add-apt-repository ppa:bean123ch/burg
Traceback (most recent call last):
File "/usr/bin/add-apt-repository", line 65, in <module>
if not sp.add_source_from_line(line):
File "/usr/lib/python2.6/dist-packages/softwareproperties/SoftwareProperties.py", line 630, in add_source_from_line
(deb_line, file) = expand_ppa_line(line.strip(), self.distro.codename)
File "/usr/lib/python2.6/dist-packages/softwareproperties/ppa.py", line 47, in expand_ppa_line
sourceslistd = apt_pkg.Config.find_dir("Dir::Etc::sourceparts") AttributeError: 'module' object has no attribute 'Config'
Vediamo come risolvere il problema.
Prima di tutto facciamo una copia di sicurezza del file in questione:
# mv /usr/bin/add-apt-repository /usr/bin/add-apt-repository-old
Poi seguiamo questa procedura.
Prima create il file add-apt-repository e aggiungeteci dentro questa robetta qua:
#!/bin/bash
if [ $# -eq 1 ]
then
ppa_name=`echo "$1" | cut -d":" -f2 -s`
if [ -z "$ppa_name" ]
then
echo "PPA name not found"
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
else
echo "$ppa_name"
echo "deb http://ppa.launchpad.net/$ppa_name/ubuntu maverick main" >> /etc/apt/sources.list
apt-get update >> /dev/null 2> /tmp/apt_add_key.txt
key=`cat /tmp/apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
rm -rf /tmp/apt_add_key.txt
fi
else
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
fi
Dopo di che:
# cp add-apt-repository.sh /usr/bin/add-apt-repository
# chmod o+x /usr/bin/add-apt-repository
# chown root:root /usr/bin/add-apt-repository
A questo punto ridate il comando:
# add-apt-repository ppa:bean123ch/burg
Ovviamente questo vale per tutti i repo PPA, non solo per BURG.
ppa repository debian squeeze
1 Commenti
Grazie!!! :)
10/07/2012