PDA

View Full Version : How to fix PPA - Personal Package Archives : KALI LINUX



Gr4nD T3R0R
2013-08-14, 17:39
Hi,
Tutorial how to fix ppa errors :)
1.
apt-get install python-software-properties
2.
apt-get install apt-file && apt-file update
3.
apt-file search add-apt-repository
output

python-software-properties: /usr/bin/add-apt-repository
python-software-properties: /usr/share/man/man1/add-apt-repository.1.gz

4. cd /usr/sbin
then:


in terminal type :
gedit add-apt-repository add code to it & save it

#!/bin/bash
if [ $# -eq 1 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
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 lucid main" >> /etc/apt/sources.list
apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt
key=`cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
rm -rf /tmp/${NAME}_apt_add_key.txt
fi
else
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
fi
chmod o+x /usr/sbin/add-apt-repository
chown root:root /usr/sbin/add-apt-repository
5.now by doing this you will no longer get errors:


add-apt-repository ppa:ondrej/php5
add-apt-repository ppa:ferramroberto/java

ZeuQma
2013-11-06, 13:08
Hi,
Tutorial how to fix ppa errors :)
1.
apt-get install python-software-properties
2.
apt-get install apt-file && apt-file update
3.
apt-file search add-apt-repository
output

python-software-properties: /usr/bin/add-apt-repository
python-software-properties: /usr/share/man/man1/add-apt-repository.1.gz

4. cd /usr/sbin
then:


in terminal type :
gedit add-apt-repository add code to it & save it

#!/bin/bash
if [ $# -eq 1 ]
NM=`uname -a && date`
NAME=`echo $NM | md5sum | cut -f1 -d" "`
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 lucid main" >> /etc/apt/sources.list
apt-get update >> /dev/null 2> /tmp/${NAME}_apt_add_key.txt
key=`cat /tmp/${NAME}_apt_add_key.txt | cut -d":" -f6 | cut -d" " -f3`
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys $key
rm -rf /tmp/${NAME}_apt_add_key.txt
fi
else
echo "Utility to add PPA repositories in your debian machine"
echo "$0 ppa:user/ppa-name"
fi
chmod o+x /usr/sbin/add-apt-repository
chown root:root /usr/sbin/add-apt-repository
5.now by doing this you will no longer get errors:


add-apt-repository ppa:ondrej/php5
add-apt-repository ppa:ferramroberto/java

can use echo raring (13.04) or saucy (13.10) in bash script (line 14).

Thanks you sharing.