PDA

View Full Version : Add-apt-repository?



altjx
2013-03-18, 16:02
How do I add repositories in Kali Linux? I was trying to add another theme and one of the tutorials suggested using that command to add the ppa:<stuff here> repository. Not sure how to go about this even after looking around articles online.

Thanks.

tr00n3r
2013-03-18, 17:11
apt-get install python-software-properties

will do the trick and then add-apt-repository ppa:WHATEVER

system_crash
2013-03-18, 18:14
Open up /etc/apt/sources.list with your text editor and just add your new rep.

Spheriax
2013-03-18, 20:20
Google my friend:

A post explaining how to add launchpad manually in debian.
**Click** (http://www.astarix.co.uk/2011/05/using-ubuntu-ppa-packages-with-debian-or-crunchbang/)

A method using an automated script
**Click** (http://blog.anantshri.info/howto-add-ppa-in-debian/)

Another manual method:
**Click** (http://www.khattam.info/howto-add-launchpad-ubuntu-ppa-in-debian-squeeze-testing-2010-11-13.html)

I've tested the automated script on an other debian distro before and it worked like a charm.
Should work just fine on Kali

tekket
2013-03-18, 21:07
Ive also been poking around trying to sort this out. Still looking.

Psychotogen
2013-03-18, 22:20
http://forums.kali.org/showthread.php?95-How-To-Install-Armitage

boynep
2013-03-19, 06:21
You can add repositories in /etc/apt/sources.conf files. Add whichever repository you want there.

altjx
2013-03-19, 12:34
Boynep,

Thanks for your response. I am still a bit confused. The command I am looking at on a lot of articles that talks about themes is in the format of "sudo add-apt-repository ppa:upubuntu-com/gtk3" for example. So, how do I put this in the /etc/apt/sources.conf file? Do I just add "ppa:upubuntu-com/gtk3" at the end of the file?

altjx
2013-03-19, 13:19
Actually, in Kali Linux, I don't even have an /etc/apt/sources.conf file.

boynep
2013-03-19, 14:27
Ok, sorry it should have been sources.list not conf my bad.

You can't add ppa because you don't have add-apt-repositories installed which is provided with python-software-properties.
First,
apt-get install python-software-properties

Then,
add-apt-repository ppa:<What-Ever-Your-PPA-Is>
apt-get update

and install your softwares.

Hope that helps.

Cheers,
Boynep

altjx
2013-03-19, 14:31
Ok, sorry it should have been sources.list not conf my bad.

You can't add ppa because you don't have add-apt-repositories installed which is provided with python-software-properties.
First,
apt-get install python-software-properties

Then,
add-apt-repository ppa:<What-Ever-Your-PPA-Is>
apt-get update

and install your softwares.

Hope that helps.

Cheers,
Boynep

Thanks! I had done this previously, but someone in the IRC channel mentioned that the PPA might have not been working or something... so I'm going to try it again later with another PPA to test it out.

I appreciate your response!

altjx
2013-03-19, 20:43
I actually think the command isn't compatible for some reason. I've tried several PPA repositories in Kali Linux by using the apt-add-repository command, and I always end up with the same error.

boynep
2013-03-20, 02:40
I just tried. Looks like it is incompatibel. Apologies, I replied without trying myself first.

I will dig what can be done.

altjx
2013-03-20, 02:51
I just tried. Looks like it is incompatibel. Apologies, I replied without trying myself first.

I will dig what can be done.

Thanks man and no problem at all!

tekket
2013-03-20, 04:18
I just tried. Looks like it is incompatibel. Apologies, I replied without trying myself first.

I will dig what can be done.

awesome. thanks!

kiluma
2013-04-26, 22:53
This isn't working for me. I was able to install python-software-properties, but when I input:

root@kiluma:~# add-apt-repository ppa:deb [arch=i386,amd64,armel,armhf] http://http.kali.org/kali kali-dev main contrib non-free
Error: need a repository as argument
My output is:

Error: need a repository as argument

Furthermore, an update gives me the following output:

W: Failed to fetch gzip:/var/lib/apt/lists/partial/http.kali.org_kali_dists_kali-dev_main_binary-i386_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/http.kali.org_kali_dists_kali_main_source_Sources Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/http.kali.org_kali_dists_kali_main_binary-amd64_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/http.kali.org_kali_dists_kali_main_binary-armel_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/http.kali.org_kali_dists_kali_main_binary-armhf_Packages Hash Sum mismatch

W: Failed to fetch gzip:/var/lib/apt/lists/partial/http.kali.org_kali_dists_kali_main_binary-i386_Packages Hash Sum mismatch

E: Some index files failed to download. They have been ignored, or old ones used instead.
Thanks for the help.

kiluma
2013-04-28, 20:08
This documentation (http://docs.kali.org/kali-support/kali-linux-mirrors) says
The mirroring infrastructure uses SSH-based triggers to ping the mirrors when they need to be refreshed. This currently takes place 4 times a day.

It goes on to give detailed instructions on how to set all this up.

I was able to complete this much:


If you don’t have yet an account dedicated for the mirrors, create such an account (here we call it “archvsync”):

$ sudo adduser --disabled-password archvsync
Adding user 'archvsync' ...
[...]
Is the information correct? [Y/n]

Create the directories that will contain the mirrors and change their owner to the dedicated user that you just created:

$ sudo mkdir /srv/mirrors/kali{,-security,-images}
$ sudo chown archvsync:archvsync /srv/mirrors/kali{,-security,-images}

I get hung up early on this step(red type is not code/quote):

Next, configure the rsync daemon (enable it if needed) to export those directories:

$ sudo sed -i -e "s/ENABLED=false/ENABLED=true/" /etc/default/rsync
----This command gives me an odd output, see below---$ sudo vim /etc/rsyncd.conf
----When I give this command it returns a file not found error---$ cat /etc/rsyncd.conf
uid = nobody
gid = nogroup
max connections = 25
socket options = SO_KEEPALIVE

[kali]
path = /srv/mirrors/kali
comment = The Kali Archive
read only = true

[kali-security]
path = /srv/mirrors/kali-security
comment = The Kali security archive
read only = true

[kali-images]
path = /srv/mirrors/kali-images
comment = The Kali ISO images
read only = true
$ sudo service rsync start
Starting rsync daemon: rsync.

This is my output to the 'sudo vim' command:


~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
"/etc/rsyncd.conf" [New File] 0,0-1 All


Right after these intructions, the documentation says this,
This tutorial doesn’t cover the configuration of the web server and the FTP server. Ideally, you should export the mirrors at http://yourmirror.net/kali, http://yourmirror.net/kali-security and http://yourmirror.net/kali-images (same for FTP).
So, I did a search for web server configuring and nothing came up. lol.

superbuyro
2013-05-20, 19:58
~$ sudo apt-get install python-software-properties
[sudo] password for remus:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-software-properties' has no installation candidate

ElecTechGeek
2013-11-12, 00:37
~$ sudo apt-get install python-software-properties
[sudo] password for remus:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python-software-properties is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-software-properties' has no installation candidate



This is the same response I am getting. 6 months and still no resolutions???

harayz
2014-04-21, 03:37
did you (or anyone) ever got this fixed?

staticn0de
2014-04-21, 07:41
Black more ops has a solution. I was able to add a ppa. I am not sure how you would remove one if you didn't want it anymore.

http://www.blackmoreops.com/2014/02/21/kali-linux-add-ppa-repository-add-apt-repository/

Jasim
2014-04-26, 03:02
Easiest way (imho) is to manually edit the repo list config file as in the examples above. I've successfully added and used numerous repos, including Ubuntu, Debian, older Backtrack repos, and others. Just be cautious and aware of possible problems if you try to use a non-Debian based repo.

Jasim
2014-04-26, 03:47
I realized after I submitted my post that some people on here are still trying to learn Linux and the prior responses to this thread don't explain exactly how to add a repo....so, here we go:

vi /etc/apt/sources.list

This will open the vi text editor and open the sources.list file (the listing for all your repositories). I just recently installed Kali on the computer I'm using so mine has this in it:


#

# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64 LIVE/INSTALL Binary 20130425-10:30]/ kali contrib main non-free

#deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64 LIVE/INSTALL Binary 20130425-10:30]/ kali contrib main non-free

deb http://http.kali.org/kali kali main non-free contrib
deb-src http://http.kali.org/kali kali main non-free contrib

## Security updates
deb http://security.kali.org/kali-security kali/updates main contrib non-free


It should look something like that. Note that the lines beginning in "#" or "##" are comments.

Let's say I want to add the Ubuntu repo. My example is an old one, but the principle is the same. Go to a black line in your file and hit 'i' to enter insert mode. I now copy and paste (or type in) the following line:



deb http://us.archive.ubuntu.com/ubuntu/ precise universe multiverse


Use whitespace (blank lines) for legibility. Leave a comment if you want. When you are finished hit 'esc' to leave insert mode. Save the file by typing ":w" and then ":q!" to exit vi.

On the command line, make sure to update your config files with "apt-get update"
You'll know that you have successfully added the repo when it lists the repo during the update cycle along with a storage memory value, it may also take some time to complete the update. For this specific example you will see something similar to the following during the 'update' command:



Get:12 http://us.archive.ubuntu.com precise/multiverse amd64 Packages [119 kB]
Get:13 http://us.archive.ubuntu.com precise/multiverse Translation-en [93.4 kB]
Get:14 http://us.archive.ubuntu.com precise/universe Translation-en [3,341 kB]
Ign http://us.archive.ubuntu.com precise/multiverse Translation-en_US
Ign http://us.archive.ubuntu.com precise/universe Translation-en_US


Now you should be ready to go and can use "apt-get install PACKAGENAME" to install stuff.

There is another way to do this. In my opinion it is more of a pain (at least at first, but might be useful later if you have a tendency to pull from many repos, which I strongly suggest avoiding). Here is the other way:
http://www.blackmoreops.com/2014/02/21/kali-linux-add-ppa-repository-add-apt-repository/

Consider yourself warned...Pulling in programs from multiple repositories that weren't specifically designed for your distro can lead to some unpleasant results. The further your drift from your family of distros, the more likely you are to encounter problems.