创建文件夹
mkdir -pv /usr/local/etc/pkg/repos
创建文件
创建/usr/local/etc/pkg/repos/utsc.conf,内容如下
ustc:{
url: "http://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/latest",
mirror_type: "none",
signature_type: "none",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD: { enabled: no }
pkg更新
root@freebsd:~ # pkg update
Updating ustc repository catalogue...
Fetching meta.conf: 100% 178 B 0.2kB/s 00:01
Fetching data.pkg: 100% 7 MiB 7.6MB/s 00:01
Processing entries: 100%
ustc repository update completed. 35589 packages processed.
All repositories are up to date.