stfl / apt-fast-mirrors

8 stars 3 forks source link

Doesn't work at all on Debian Bullseye #4

Closed dhasial closed 6 months ago

dhasial commented 3 years ago

I get output from the script

Searching for fastest mirrors...
Traceback (most recent call last):
  File "/home/valence/src/apt-fast-mirrors/af-mirrors.py", line 88, in <module>
    mirror_entry = tokens.get_token()
NameError: name 'tokens' is not defined

and all that happens is I get the line

# Mirrors found with sftl/af_mirrors.py

added to /etc/apt-fast.conf, right above the MIRRORS variable, which stays empty

averyfreeman commented 2 years ago

@Dhamma-valence I am getting this same error, but from a look at /etc/apt-fast.conf, it appears that no MIRROR variables are uncommented. I'd try adding some mirrors, the default is downloading from up to 5, but you probably set that when you installed the package.

There's an easy-going blog post on it here: https://www.tecmint.com/use-apt-fast-command-speed-up-apt-get-downloads-installs-ubuntu/

And of course, man apt-fast is also helpful (though more obtuse).

I just came in here to see if anyone else had addressed the issue, and if there were some explicit instructions, as I have not even heard of apt-fast before (I don't believe the developer of af-mirrors.py is the developer of apt-fast).

And perhaps open up an issue recommending an addition to the README.md

wait a sec, though ... if you're running debian, why don't you just use netselect-apt?

UPDATE: after working with it for a bit and looking over the source code, the problem may also have to do with netselect-apt not being pre-populated with mirrors, but I tried to configure it to work with Ubuntu and it doesn't support Jammy's codename.

so I decided to pack it in on this. It also chewed up my /etc/apt-fast.conf when it didn't find any mirrors, was glad I had a backup.

There's apt-smart on Pypi if you need something that works from the command line, it looks like a winner. https://www.linuxteacher.com/how-to-find-best-ubuntu-apt-repository-mirror/