4

I am on raspibian lite and slow internet speed, I am trying to pull lightdm using apt-get but looks like it's a big deal to pull 250 mb on slow internet. So I am looking for a fast mirror I can set up in my raspibian lite installed.

Is it possible to change site to apt-get packages ?

For example I googled and found this : http://mirrordirector.raspbian.org/raspbian/dists/

Looks promising but I do not know how to set it up

Similar question on askubuntu : https://askubuntu.com/questions/37753/how-can-i-get-apt-to-use-a-mirror-close-to-me-or-choose-a-faster-mirror

1

For example I googled and found this : http://mirrordirector.raspbian.org

That's what you are already using; have a look in /etc/apt/sources.list. Notice it is called a mirrordirector, meaning it redirects traffic, although I am not sure how many choices it actually has to redirect to. Raspbian has no where near the user base or resource that Ubuntu does, so it is unrealistic to expect it the repositories are going to provide the same kind of coverage or bandwidth.

The problem, such as it is, is either where you are located or with your local network. If you can't do anything about either of those things you will just have to be patient.

0

Even though it's the accepted answer, the previous answer doesn't actually answer the question. While it's true that raspbian isn't as popular as Ubuntu, that doesn't indicate that one shouldn't believe there aren't mirrors. There are in fact plenty of mirrors and having a mirror can save you from having to wait days to successfully update your system.

You can change the source of your apt packages by editing the file /etc/apt/sources.list . You'll need to use sudo since the file is owned by root. So you might try the following in the terminal...

sudo nano /etc/apt/sources.list

Once you open the file you should see a line starting with deb. Below that is a deb-src line for packages to help you compile packages from source, which you can probably ignore. You may or may not currently be using mirrordirector.raspbian.org and that may or may not give you the best results. To try it change the url in the deb line to http://mirrordirector.raspbian.org/raspbian/ . If that doesn't work well for you, then you can switch the URL with one that seems nearest to you from this list https://www.raspbian.org/RaspbianMirrors .

There's another file for apt sources in recent raspbian open it with...

sudo nano /etc/apt/sources.list.d/raspi.list

Then change the URL in the probably top line starting with deb to one of the URLs from the list linked above like http://mirror.ox.ac.uk/sites/archive.raspbian.org/archive/raspbian if you are near Oxford England or http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian/ if you are in China. Then just save the file and update your repository data with...

sudo apt-get update

Now you are ready to go. Good Luck!

  • There's another file for apt sources in recent raspbian open it with... raspi.list contains the source for the RPF additions/modifications. There is no mirror site for that. If you change it you will get no updates, etc. for these packages (which includes kernel updates) – Dirk Feb 23 '19 at 0:14
  • @Dirk could you elaborate a little? I am using a mirror presently and it seems to work great. – James Feb 23 '19 at 1:12
  • So you replaced archive.raspberrypi.org in raspi.list with something else? What does e,g, apt policy raspberrypi-bootloader give as output? – Dirk Feb 23 '19 at 8:01
  • ~ $ apt policy raspberrypi-bootloader raspberrypi-bootloader: Installed: 1.20190215-1 Candidate: 1.20190215-1 Version table: *** 1.20190215-1 500 500 http://mirrors.ustc.edu.cn/archive.raspberrypi.org/debian stretch/main armhf Packages 100 /var/lib/dpkg/status – James Feb 24 '19 at 9:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.