I know I've posted like 15 threads so far asking for help... but here's my latest problem:

My repositories list is terrible, and keeps giving me hell.

Any chance any of you are willing to explain to me where to get a repositories list and how to use it?

Recommended Answers

All 14 Replies

Depends which distro you're using (and which package manager at that). For Debian-based distributions, the apt-get repositories list is in /etc/apt/sources.list. Simply add urls that you want (you can find some at www.apt-get.org).

If you're not using apt-get, well you'll just have to elaborate. ;)

Well I keep getting the error when I apt-get telling me that there are no such files or directories on several of the urls I have, and it tells me to apt-get update to fix these problems. It tells me to apt-get update to get rid of these problems even when I apt-get update.

OK, what you'll want to do is add a few repositories from apt-get.org, however the site seems to be down at the moment.

In the meantime, check out the packages at http://www.debian.org/distrib/packages and download any .debs if you want to install a particular package. To install a .deb file, simply use the following syntax on the command line:

dpkg --install file.deb

Hope this helps

I think it was only down because I was accessing the extremely long list of repositories, and they said that it should only be done in extreme circumstances, because it's that big.

Alright, I think this all helps... but what about the synaptic pkg manager? Doesn't that update my repositories itself? OR could it?

Alright, I think this all helps... but what about the synaptic pkg manager? Doesn't that update my repositories itself? OR could it?

Synaptic Package Manager is basically a fancy GUI for apt-get. It does everything that apt-get can do, but you might want to try it and see if it automatically updates everything. And yes it can update repostiories.

One big question for solving this: What distribution are you using? And, what version?

If you've gone through and added repositories for other needs and failed to remove them, then they'll still be in the list. To get the list optimized, you should either remove these entries or comment them out (with a # sign)

First, open the list:
sudo gedit /etc/apt/sources.list

You'll want to remove anything you aren't currently using. The important ones are the distributions specific entries, such as the dapper (or edgy) universe and multiverse entries. Also, be sure that you don't have duplicates.

I'd recommend commenting different entries out rather than removing them, as it makes correcting mistakes, should you make them, much easier.

google for "sources.list ubuntu" (or whatever dist you have) theres loads of sample ones on the net you can cut and paste

Well, I am using Debian etch. The problem is that several of my entries apparently don't have proper lists on those sites for apt-get. I can't tell which entries these are that are giving me a shit-load of error messages every time. I liked the idea to search for samples, maybe I could go to the debian web-site and get a file from there to replace my sources.list.
Thanks for the help, everyone. I'm sure these ideas will help me out. I have a lot of things on my mind with this computer, so one down is nice.

i have debian etch i can give you a sources.list (set up for UK based mirrors with all debian repositories and security updates). Hint, dont use synaptic to modify sources.list, edit it by hand and it will get less mashed up

here is my sources.list

after copying this sources.list to /etc/apt you must do apt-get update and check for errors

sorry, but there appears to be nothing in the code box to me ^_^U

But I found a really cool package that will do it for me, and it will do it after testing official mirrors from debian.org. It uses a script to ping all the listed mirrors, then selects the fastest one, and writes a new sources.list file, putting the original in sources.list.orig.

The package is netselect and netselect-apt. (I was told by Debian.org that netselect-apt (the one that does the above) was included with netselect, but it wasn't.) I'll probably just add to the one netselect-apt made from apt-get.org.

Oh, and the format for using netselect is: netselect [I]servers to test seperated by spaces[/I] It'll automatically tell you which mirror is fastest and how fast the ping was.

for netselect-apt: # netselect-apt [I]stable/testing/unstable[/I] You just tell it which distro of debian you are using. Stable is the default.

But I'm checking right now to see how screwed-up-looking my sources.list is.
[edit] Well, it's really short... it only has 3 things in it, main, src, and security. Here's the new sources.list:

# The main Debian Packages.
deb http://[i]fastest server it found, in ip form[/i]/debian testing main contrib
# Uncomment the deb-src lineif you want 'apt-get source'
# to work with most pakages.
deb-src http://[i]same server[/i]/debian/  testing main contrib
# uncommenting the following line will allow security updates
# deb http://security.debian.org/ stable/updates main contrib

I don't think I want the security updates, but whatev'.
Do you guys think this will work for most regular stuff?

yeah sorry i had some trouble booting the machine i was going to get the sources.list from - yours looks good thats pretty much the standard file. but where it says:

main contrib

you may want to change it to:

main contrib non-free

this will allow non GPL things like Nvidia Drivers and Java

hmmm... should this be another line, or does non-free include free as well?

i noticed an error here, etch (testing) now has its own security updates. change stable to testing in this line - you should add "non-free" so it looks like this

deb http://security.debian.org/ stable/updates main contrib non-free

Thanks, I probably wouldn't have found that out for a while.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.