Raspberry Pi 4B安装上FreeBSD 15.1后,首次更新出错,解决方法是换源

 

在Raspberry Pi 4B安装上FreeBSD 15.1后,首次更新,会出现下面的错误:

euler@rpi4b:~ $ pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:15:aarch64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
pkg: failed to extract pkg-static: Failed to create dir '/usr/local/sbin'
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:15:aarch64/kmods_quarterly_1, please wait...
pkg: Error fetching https://pkg.FreeBSD.org/FreeBSD:15:aarch64/kmods_quarterly_1/Latest/pkg.pkg: Not Found
A pre-built version of pkg could not be found for your system.

euler@rpi4b:~ $

 

 

解决方法是:换源

 

修改pkg源
用户自定义源:
mkdir -p /usr/local/etc/pkg/repos
vi /usr/local/etc/pkg/repos/FreeBSD.conf

填写如下内容:

USTC-ports: {
url: "https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/quarterly",
mirror_type: "none",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}

FreeBSD-ports: { enabled: no }

USTC-ports-kmods: {
url: "https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/kmods_quarterly_${VERSION_MINOR}",
mirror_type: "none",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}

FreeBSD-ports-kmods: { enabled: no }

USTC-base: {
url: "https://mirrors.ustc.edu.cn/freebsd-pkg/${ABI}/base_release_${VERSION_MINOR}",
mirror_type: "none",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",
enabled: yes
}

 

换源参考:https://book.bsdcn.org/di-8-zhang-ruan-jian-guan-li/di-8.2-jie-freebsd-ruan-jian-yuan

 然后输入:

pkg update -f

进行更新:

root@rpi4b:/home/euler # pkg update -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from https://mirrors.ustc.edu.cn/freebsd-pkg/FreeBSD:15:aarch64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-2.7.5...
Extracting pkg-2.7.5: 100%
Updating USTC-ports repository catalogue...
Fetching meta.conf: 100% 179 B 0.2 kB/s 00:01
Fetching data: 100% 10 MiB 10.8 MB/s 00:01
Processing entries: 100%
USTC-ports repository update completed. 36634 packages processed.
Updating USTC-ports-kmods repository catalogue...
Fetching meta.conf: 100% 179 B 0.2 kB/s 00:01
Fetching data: 100% 16 KiB 16.9 kB/s 00:01
Processing entries: 100%
USTC-ports-kmods repository update completed. 79 packages processed.
Updating USTC-base repository catalogue...
Fetching meta.conf: 100% 179 B 0.2 kB/s 00:01
Fetching data: 100% 81 KiB 82.7 kB/s 00:01
Processing entries: 100%
USTC-base repository update completed. 502 packages processed.
All repositories are up to date.
root@rpi4b:/home/euler #

不再报错,这样就完成了更新

 

可以尝试安装vim 

pkg install vim

 

安装qbittorrent

先查看有哪些qbittorrent

pkg search qbittorrent

 

root@rpi4b:/home/euler # pkg search qbittorrent
qbittorrent-5.2.3 Bittorrent client using Qt6 and libtorrent-rasterbar
qbittorrent-nox-5.2.3 Bittorrent client using Qt6 and libtorrent-rasterbar (web UI version)

 

选择安装qbittorrent-nox

root@rpi4b:/home/euler # pkg install qbittorrent-nox-5.2.3

 

Raspberry Pi 4B处理能力有限,安装qbittorrent可能需要花点时间。

 

posted @ 2025-04-30 00:17  profesor  阅读(406)  评论(0)    收藏  举报