Git Product home page Git Product logo

vegardit / fast-apt-mirror.sh Goto Github PK

View Code? Open in Web Editor NEW
19.0 4.0 2.0 59 KB

fast-apt-mirror.sh is a self-contained Bash script that helps you to easily and quickly determine and configure a fast APT repository mirror on Debian, Ubuntu and Pop!_OS systems.

Home Page: https://buymeacoffee.com/vegardit

License: Apache License 2.0

Shell 98.75% Ruby 1.25%
apt-get bash command-line-tool debian ubuntu bash-script apt-source apt mirrors apt-repo-action apt-repository

fast-apt-mirror.sh's Introduction

fast-apt-mirror.sh

Build Build Status License Contributor Covenant

Feedback and high-quality pull requests are highly welcome!

  1. What is it?
  2. Usage as GitHub Action
  3. Usage on the commandline
    1. Installation
    2. current command
    3. find command
    4. set command
  4. Alternatives
  5. License

What is it?

fast-apt-mirror.sh is a self-contained Bash script that helps you to easily and quickly determine and configure a fast APT repository mirror on Debian, Ubuntu, Pop!_OS, Kali systems.

It was born out of the ongoing stability issues with the azure.archive.ubuntu.com Ubuntu mirror pre-configured in GitHub Actions runners.

Usage as GitHub Action

name: Build
on: [ push, pull_request ]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - name: Configure Fast APT Mirror
      uses: vegardit/fast-apt-mirror.sh@v1
      with: # the following parameters are listed with their action default values and are optional
        healthchecks:  20 # Number of mirrors from the mirrors list to check for availability and up-to-dateness
        speedtests:    10 # Maximum number of healthy mirrors to test for speed
        parallel:       2 # Number of parallel speed tests
        sample-size: 1024 # Number of kilobytes to download during the speed from each mirror
        sample-time:    3 # Maximum number of seconds within the sample download from a mirror must finish

The action output will look like this:

Current mirror: http://azure.archive.ubuntu.com/ubuntu/ (/etc/apt/sources.list)
Randomly selecting 20 mirrors...done
Checking health status of 20 mirrors....................done
 -> 17 mirrors are reachable and up-to-date
Speed testing 10 of the available 17 mirrors (sample download size: 1024KB)..........done
 -> http://azure.archive.ubuntu.com/ubuntu/ (85MB/s) determined as fastest mirror within 4 seconds
 -> http://pubmirrors.dal.corespace.com/ubuntu/ (3.7MB/s)
 -> http://mirrors.xmission.com/ubuntu/ (3.0MB/s)
 -> http://www.gtlib.gatech.edu/pub/ubuntu/ (2.0MB/s)
 -> http://mirrors.rit.edu/ubuntu/ (1.8MB/s)
 -> http://ubuntu.cs.utah.edu/ubuntu/ (1.8MB/s)
 -> https://mirror.us.leaseweb.net/ubuntu/ (1.6MB/s)
 -> https://mirrors.iu13.net/ubuntu/ (1.5MB/s)
 -> http://mirrors.syringanetworks.net/ubuntu-archive/ (1.4MB/s)
 -> https://mirrors.bloomu.edu/ubuntu/ (1.1MB/s)
Current mirror: http://azure.archive.ubuntu.com/ubuntu/ (/etc/apt/sources.list)
Nothing to do, already using: http://azure.archive.ubuntu.com/ubuntu/

Usage on the command line

Installation

For example:

# install pre-reqs: bash, curl and HTTPS transport support for apt
$ sudo apt-get install -y bash curl apt-transport-https ca-certificates

# install fast-apt-mirror.sh under /usr/local/bin/ to make it automatically available via $PATH
$ sudo curl https://raw.githubusercontent.com/vegardit/fast-apt-mirror.sh/v1/fast-apt-mirror.sh -o /usr/local/bin/fast-apt-mirror.sh
$ sudo chmod 755 /usr/local/bin/fast-apt-mirror.sh

# show the help
$ fast-apt-mirror.sh --help
fast-apt-mirror.sh COMMAND

Available commands:
 current - Prints the currently configured APT mirror.
 find    - Finds and prints the URL of a fast APT mirror and optionally applies it using the 'fast-apt-mirror.sh set' command.
 set     - Configures the given APT mirror in /etc/apt/sources.list and runs 'sudo apt-get update'.

The current sub command

Determines the currently effective APT mirror.

$ fast-apt-mirror.sh current
Current mirror: http://artfiles.org/ubuntu

Capture the current mirror URL in a variable:

$ current_mirror=$(fast-apt-mirror.sh current)
$ echo $current_mirror
http://artfiles.org/ubuntu

The find sub command

Determines and prints the URL of a fast APT mirror and optionally activates it.

To perform the connectivity and speed tests, the curl command must be installed.

Usage:

fast-apt-mirror.sh find [OPTION]...

Options:
     --apply            - Replaces the current APT mirror in /etc/apt/(sources.list|sources.list.d/system.sources) with a fast mirror and runs 'sudo apt-get update'
     --exclude-current  - If specified, don't include the current APT mirror in the speed tests.
     --healthchecks N   - Number of mirrors from the mirrors list to check for availability and up-to-dateness - default is 20
     --speedtests N     - Maximum number of healthy mirrors to test for speed - default is 5
 -p, --parallel N       - Number of parallel speed tests. May result in incorrect results because of competing connections but finds a suitable mirror faster.
     --sample-size KB   - Number of kilobytes to download during the speed from each mirror - default is 200KB
     --sample-time SECS - Maximum number of seconds within the sample download from a mirror must finish - default is 3
 -v, --verbose          - More output. Specify multiple times to increase verbosity.

Finding a fast mirror:

$ fast-apt-mirror.sh find

Current mirror: http://artfiles.org/ubuntu/
Randomly selecting 20 mirrors...done
Checking sync status of 20 mirrors....................done
 -> 20 mirrors are reachable and up-to-date
Speed testing 5 of the available 20 mirrors (sample download size: 200KB).....done
 -> https://mirror.netzwerge.de/ubuntu/ (1470 KB/s) determined as fastest mirror within 4 seconds

Capturing the determined mirror URL in a variable

$ fast_mirror=$(fast-apt-mirror.sh find)
$ echo $fast_mirror
https://mirror.netzwerge.de/ubuntu/

Finding and activating a fast mirror:

$ fast-apt-mirror.sh find --apply

Current mirror: http://azure.archive.ubuntu.com/ubuntu/
Randomly selecting 20 mirrors...done
Checking sync status of 20 mirrors....................done
 -> 20 mirrors are reachable and up-to-date
Speed testing 5 of the available 20 mirrors (sample download size: 200KB).....done
 -> https://ubuntu.mirror.shastacoe.net/ubuntu/ (2409 KB/s) determined as fastest mirror within 6 seconds
Current mirror: http://azure.archive.ubuntu.com/ubuntu/
Creating backup /etc/apt/sources.list.bak.20230207_211544
Changing mirror from [http://azure.archive.ubuntu.com/ubuntu/] to [https://ubuntu.mirror.shastacoe.net/ubuntu/]...
Hit:1 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease
Get:2 https://ubuntu.mirror.shastacoe.net/ubuntu focal InRelease [265 kB]
....
Fetched 27.1 MB in 5s (5915 kB/s)
Reading package lists... Done

The set sub command

Finds and prints the URL of a fast APT mirror and optionally applies it using the fast-apt-mirror.sh set command.

Usage:

fast-apt-mirror.sh set MIRROR_URL

Parameters:
  MIRROR_URL - the APT mirror URL to configure.

Example:

$ fast-apt-mirror.sh set https://mirrors.xtom.com/ubuntu/

Current mirror: http://azure.archive.ubuntu.com/ubuntu/
Creating backup /etc/apt/sources.list.bak.20230207_211544
Changing mirror from [http://azure.archive.ubuntu.com/ubuntu/] to [https://mirrors.xtom.com/ubuntu/]...
Hit:1 https://packages.microsoft.com/ubuntu/20.04/prod focal InRelease
Get:2 https://ubuntu.mirror.shastacoe.net/ubuntu focal InRelease [265 kB]....
...
Fetched 26.9 MB in 5s (4211 kB/s)
Reading package lists... Done

Alternatives

Here is a list of possible alternative which didn't work for us for one reason or another:

License

All files are released under the Apache License 2.0.

Individual files contain the following tag instead of the full license text:

SPDX-License-Identifier: Apache-2.0

This enables machine processing of license information based on the SPDX License Identifiers that are available here: https://spdx.org/licenses/.

fast-apt-mirror.sh's People

Contributors

cloudenum avatar sebthom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

dbpaul 424778940z

fast-apt-mirror.sh's Issues

cannot determine current apt mirror

Not sure what happened or what could have even caused this, it might just be actions being weird, seems to be pretty recent.

Seen here: https://github.com/tinygrad/tinygrad/actions/runs/5881949748/job/15951433949?pr=1558
here: https://github.com/tinygrad/tinygrad/actions/runs/5881949748/job/15951433775?pr=1558
here: https://github.com/tinygrad/tinygrad/actions/runs/5881931452/job/15951377952?pr=1537
here: https://github.com/tinygrad/tinygrad/actions/runs/5875504570/job/15931888916?pr=1076
here: https://github.com/tinygrad/tinygrad/actions/runs/5875504570/job/15931889162?pr=1076

  APT::Acquire::Retries "3";
  + curl -sSfL --retry 3 --max-time 6 https://raw.githubusercontent.com/vegardit/fast-apt-mirror.sh/v1/fast-apt-mirror.sh -o /home/runner/fast-apt-mirror.sh
  Current mirror: unknown
  Randomly selecting 20 mirrors...done
  Checking health status of 20 mirrors using '/dists/focal-security/Contents-amd64.gz'....................done
   -> outdated   (last modified: 2023-08-15 08:47:44 UTC) http://mirror.umd.edu/ubuntu/
   -> outdated   (last modified: 2023-08-15 08:47:44 UTC) http://mirror.umd.edu/ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) http://mirrors.rit.edu/ubuntu/
   -> outdated   (last modified: 2023-08-15 08:47:44 UTC) http://mirror.mrjester.net/ubuntu/archive/
   -> outdated   (last modified: 2023-08-15 08:47:44 UTC) http://mirror.mrjester.net/ubuntu/archive/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) http://mirror.steadfastnet.com/ubuntu/
   -> outdated   (last modified: 2023-08-15 08:47:44 UTC) http://plug-mirror.rcac.purdue.edu/ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) http://mirror.pit.teraswitch.com/ubuntu/
   -> outdated   (last modified: 2023-08-01 05:51:46 UTC) https://mirror.mia.velocihost.net/ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) http://repos.forethought.net/ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) http://www.gtlib.gatech.edu/pub/ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) http://mirror.us-sc.kamatera.com/ubuntu/
   -> outdated   (last modified: 2023-08-15 08:47:44 UTC) https://mirrors.wikimedia.org/ubuntu/
   -> outdated   (last modified: 2023-08-15 08:47:44 UTC) http://mirror.uoregon.edu/ubuntu/
   ->                         n/a                          https://mirror.enzu.com/ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) http://mirrors.syringanetworks.net/ubuntu-archive/
   ->                         n/a                          http://ftp.ussg.iu.edu/linux/ubuntu/
   -> outdated   (last modified: 2020-08-19 04:19:51 UTC) http://mirrors.arpnetworks.com/Ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) https://mirror.lstn.net/ubuntu/
   -> UP-TO-DATE (last modified: 2023-08-16 06:07:16 UTC) https://repo.ialab.dsu.edu/ubuntu/
   => 9 mirrors are reachable and up-to-date
  Speed testing 9 of the available 9 mirrors (sample download size: 1024KB).........done
   -> http://mirrors.syringanetworks.net/ubuntu-archive/ (782KB/s)
   -> http://repos.forethought.net/ubuntu/ (1.1MB/s)
   -> http://mirror.us-sc.kamatera.com/ubuntu/ (2.0MB/s)
   -> https://repo.ialab.dsu.edu/ubuntu/ (2.7MB/s)
   -> https://mirror.lstn.net/ubuntu/ (2.8MB/s)
   -> http://mirror.pit.teraswitch.com/ubuntu/ (3.5MB/s)
   -> http://mirror.steadfastnet.com/ubuntu/ (5.2MB/s)
   -> http://www.gtlib.gatech.edu/pub/ubuntu/ (5.7MB/s)
  Current mirror: unknown
  ERROR: Cannot set APT mirror: cannot determine current APT mirror.

Mirror not changed (or not fully tested)

CI build still fails as mirror only tested for downloading for benchmark.

Today's issue is a bit different, which is not covered by the script.
Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Also maybe an option to blacklist repos would be helpful, or at least an option to ban all azure repos

Linux: Configure fast APT mirror
  APT::Acquire::Retries "3";
  + curl -sSfL --retry 3 --max-time 6 https://raw.githubusercontent.com/vegardit/fast-apt-mirror.sh/v1/fast-apt-mirror.sh -o /home/runner/fast-apt-mirror.sh
  Current mirror: http://azure.archive.ubuntu.com/ubuntu/ (/etc/apt/apt-mirrors.txt)
  Randomly selecting 20 mirrors...done
  Checking health status of 20 mirrors using '/dists/jammy-security/Contents-amd64.gz'....................done
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://archive.ubuntu.com/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://azure.archive.ubuntu.com/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirror.cogentco.com/pub/linux/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirror.math.princeton.edu/pub/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirror.metrocast.net/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirror.team-cymru.org/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirror.us-ny2.kamatera.com/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirror.us-tx.kamatera.com/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirrors.liquidweb.com/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirrors.ocf.berkeley.edu/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://mirrors.usinternet.com/ubuntu/archive/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://ubuntu.phoenixnap.com/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) http://www.gtlib.gatech.edu/pub/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) https://atl.mirrors.clouvider.net/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) https://la.mirrors.clouvider.net/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) https://mirrors.iu13.net/ubuntu/
   -> UP-TO-DATE (last modified: 2024-04-23 01:29:38 UTC) https://mirrors.tscak.com/ubuntu/
   -> outdated   (last modified: 2024-04-20 01:29:58 UTC) http://mirrors.advancedhosters.com/ubuntu/
   -> outdated   (last modified: 2023-01-26 05:30:47 UTC) https://mirror.enzu.com/ubuntu/
   ->                         n/a                          http://mirrors.arpnetworks.com/Ubuntu/
   => 19 mirrors are reachable
  Speed testing 10 of the available 19 mirrors (sample download size: 1024KB)..........done
   -> http://mirror.team-cymru.org/ubuntu/ (174KB/s)
   -> http://archive.ubuntu.com/ubuntu/ (1.5MB/s)
   -> http://mirrors.ocf.berkeley.edu/ubuntu/ (1.6MB/s)
   -> http://mirror.us-tx.kamatera.com/ubuntu/ (2.6MB/s)
   -> http://mirrors.liquidweb.com/ubuntu/ (3.6MB/s)
   -> http://mirror.metrocast.net/ubuntu/ (4.2MB/s)
   -> http://mirror.math.princeton.edu/pub/ubuntu/ (5.6MB/s)
   -> http://mirror.us-ny2.kamatera.com/ubuntu/ (14MB/s)
   -> http://mirror.cogentco.com/pub/linux/ubuntu/ (21MB/s)
   => http://azure.archive.ubuntu.com/ubuntu/ (82MB/s) determined as fastest mirror within 5 seconds
  Current mirror: http://azure.archive.ubuntu.com/ubuntu/ (/etc/apt/apt-mirrors.txt)
  Nothing to do, already using: http://azure.archive.ubuntu.com/ubuntu/
  http://azure.archive.ubuntu.com/ubuntu/
  + sudo apt-get update
  Get:1 file:/etc/apt/apt-mirrors.txt Mirrorlist [142 B]
  Get:6 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
  Err:6 https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease
    Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
  Hit:2 http://azure.archive.ubuntu.com/ubuntu jammy InRelease
  Get:3 http://azure.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
  Get:4 http://azure.archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]
  Get:5 http://azure.archive.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
  Get:7 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1610 kB]
  Get:8 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main Translation-en [303 kB]
  Get:9 http://azure.archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1830 kB]
  Hit:13 https://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu jammy InRelease
  Get:10 http://azure.archive.ubuntu.com/ubuntu jammy-updates/restricted Translation-en [311 kB]
  Get:11 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1070 kB]
  Get:12 http://azure.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [244 kB]
  Get:14 http://azure.archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [27.2 kB]
  Get:15 http://azure.archive.ubuntu.com/ubuntu jammy-backports/universe Translation-en [16.2 kB]
  Get:16 http://azure.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1[39](https://github.com/OneKeyHQ/bluetooth-firmware-pro/actions/runs/8814823025/job/24195516436#step:2:41)2 kB]
  Get:17 http://azure.archive.ubuntu.com/ubuntu jammy-security/main Translation-en [243 kB]
  Get:18 http://azure.archive.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1768 kB]
  Get:19 http://azure.archive.ubuntu.com/ubuntu jammy-security/restricted Translation-en [299 kB]
  Get:20 http://azure.archive.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [848 kB]
  Get:21 http://azure.archive.ubuntu.com/ubuntu jammy-security/universe Translation-en [163 kB]
  Reading package lists...
  E: Failed to fetch https://packages.microsoft.com/ubuntu/22.04/prod/dists/jammy/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
  E: The repository 'https://packages.microsoft.com/ubuntu/22.04/prod jammy InRelease' is no longer signed.
  Error: Process completed with exit code 100.

Doesn't update multiple repos in the same deb822 file (Ubuntu 24.04)

The fast-apt-mirror.sh find --apply feature doesn't update the repo URI if there are multiple repositories in the same deb822-formated file, as is the case by default in Ubuntu 24.04. It appears to only update the first one.

Default Ubuntu 22.04 /etc/apt/sources.list.d/ubuntu.sources file (relevant lines):


Types: deb
URIs: http://archive.ubuntu.com/ubuntu
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Ubuntu 22.04 /etc/apt/sources.list.d/ubuntu.sources file after running fast-apt-mirror.sh find --apply (relevant lines):


Types: deb
URIs: http://fast.mirror.example.com/ubuntu
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://security.ubuntu.com/ubuntu
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Note that only the URI of the first repository is changed even though both are "main" repos.

The desired behavior would be that both URIs are changed.


Types: deb
URIs: http://fast.mirror.example.com/ubuntu
Suites: noble noble-updates noble-backports
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Types: deb
URIs: http://fast.mirror.example.com/ubuntu
Suites: noble-security
Components: main universe restricted multiverse
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg

Add the option to select country for ubuntu-based distro

As of now the mirrors.txt will always return

http://archive.ubuntu.com/ubuntu/

Which render this script become useless, because it is essentially just speed testing the default mirror (which again already being used in most cases).

By adding the country options this issue can be solved, another way is using automatic country detection using IP.

Sometimes failing with Broken Pipe in Github Actions

Noticed here: https://github.com/tinygrad/tinygrad/actions/runs/5790180583/job/15692747572

Relevant log section:

APT::Acquire::Retries "3";
+ curl -sSfL --retry 3 --max-time 6 https://raw.githubusercontent.com/vegardit/fast-apt-mirror.sh/v1/fast-apt-mirror.sh -o /home/runner/fast-apt-mirror.sh
Current mirror: http://azure.archive.ubuntu.com/ubuntu/ (/etc/apt/sources.list)
Randomly selecting 20 mirrors...done
Checking health status of 20 mirrors....................done
 -> 15 mirrors are reachable and up-to-date
http://azure.archive.ubuntu.com/ubuntu/
https://mirrors.xtom.com/ubuntu/
https://mirrors.wikimedia.org/ubuntu/
http://www.club.cc.cmu.edu/pub/ubuntu/
http://ubuntu.phoenixnap.com/ubuntu/
http://ubuntu.mirror.frontiernet.net/ubuntu/
http://repos.forethought.net/ubuntu/
http://plug-mirror.rcac.purdue.edu/ubuntu/
http://mirrors.tripadvisor.com/ubuntu/
http://mirrors.syringanetworks.net/ubuntu-archive/
Speed testing 10 of the available 15 mirrors (sample download size: 1024KB)..........done
/home/runner/fast-apt-mirror.sh: line 337: echo: write error: Broken pipe
21:42:48 Error - exited with status 1 in /home/runner/fast-apt-mirror.sh at line 337:
21:42:48 Error - exited with status 1 in /home/runner/fast-apt-mirror.sh at line 337:
   334	    return $RC_MISC_ERROR
   335	  fi
   336	  fastest_mirror=$(echo "$mirrors_with_speed" | head -1 | cut -d" " -f2)
   337	  fastest_mirror_speed=$(echo "$mirrors_with_speed" | head -1 | cut -d" " -f1 | numfmt --to=iec --suffix=B/s)
   338	  >&2 echo " -> $fastest_mirror ($fastest_mirror_speed) determined as fastest mirror within $(( $(date +%s) - start_at )) seconds"
   339	  if [[ ${verbosity:-} -gt 0 ]]; then
   340	    echo "$mirrors_with_speed" | tail -n +2 | while IFS= read -r mirror; do

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.