Solved pkg install noto fonts failed

pkg install noto
pkg: cached package noto-1.0.5_1: size mismatch, fetching from remote
...

tried
pkg update -f
rm -rf /var/cache/pkg/*
rm /var/db/pkg/repo-*.sqlite
pkg bootstrap -f

but can't be solved, the same error

/usr/local/etc/pkg/repos/FreeBSD.conf
Code:
FreeBSD: {
  url: "pkg+https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/latest",
}

The official pkg source is too slow to be tried.
 
Have you disabled /etc/pkg/FreeBSD.conf? The default reading order of repository configuration files are /etc/pkg/FreeBSD.conf then /usr/local/etc/pkg/repos/FreeBSD.conf - pkg.conf(5). If you haven't disabled, the original default repository and /usr/local/etc/pkg/repos/FreeBSD.conf would conflict with eachother.
 
Have you disabled /etc/pkg/FreeBSD.conf? The default reading order of repository configuration files are /etc/pkg/FreeBSD.conf then /usr/local/etc/pkg/repos/FreeBSD.conf - pkg.conf(5). If you haven't disabled, the original default repository and /usr/local/etc/pkg/repos/FreeBSD.conf would conflict with eachother.

pkg.conf(5)
Hence the very common idiom, used to
turn off the default FreeBSD configuration shipped in
/etc/pkg/FreeBSD.conf. Rather than editing that file directly, create
/usr/local/etc/pkg/repos/FreeBSD.conf with this content:

FreeBSD: { enabled: NO }

However, not add add FreeBSD: { enabled: NO } yet, but download speed shows that it is downloading from the mirror site, i.e. using /usr/local/etc/pkg/repos/FreeBSD.conf, at least for some pkgs.
 
Add the line FreeBSD: { enabled: NO } in /usr/local/etc/pkg/repos/FreeBSD.conf, rename package repository:
Rich (BB code):
FreeBSD: { enabled: no }

ustc: {
url: "pkg+https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/latest",
}
pkg update
 
Have you disabled /etc/pkg/FreeBSD.conf? The default reading order of repository configuration files are /etc/pkg/FreeBSD.conf then /usr/local/etc/pkg/repos/FreeBSD.conf - pkg.conf(5). If you haven't disabled, the original default repository and /usr/local/etc/pkg/repos/FreeBSD.conf would conflict with eachother.
They won't conflict. Settings from /usr/local/etc/pkg/repos/FreeBSD.conf simply overrule whatever is set in /etc/pkg/FreeBSD.conf.

But, this is not an official package repository mirror, so there are zero guarantees here.

These are the only supported ones (at this time):
Code:
pkg0.nyi.freebsd.org 
pkg0.bme.freebsd.org
pkg0.cyb.freebsd.org
pkg0.isc.freebsd.org
pkg0.kwc.freebsd.org
pkg0.twn.freebsd.org
However, there is NO guarantee any specific mirror is working. That's why you should typically use pkg.freebsd.org as that will always resolve to a working mirror.
 
Back
Top