truenas出现"pkg: file:///usr/ports/packages/packagesite.pkg: No such file or directory"的解决方法
执行 pkg update -f
和pkg update
命令时出现了下面的错误
1
2
3
4
5
6
7
8
Updating local repository catalogue...
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.pkg: No such file or directory
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!
解决方法,关闭本地文件源,开源freebsd的官方源即可,命令如下
1
2
sed 's/enabled: yes/enabled: no/' /usr/local/etc/pkg/repos/local.conf
sed 's/enabled: no/enabled: yes/' /usr/local/etc/pkg/repos/FreeBSD.conf
您现在应该能够使用pkg命令了。
如果出现下面错误,应该检查你的网络或者DNS服务器地址是否有效,可以手动指定DNS地址
1
2
3
4
5
6
7
Updating FreeBSD repository catalogue...
pkg: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/meta.txz: No address record
repository FreeBSD has no meta file, using default settings
pkg: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.pkg: No address record
pkg: http://pkg.freebsd.org/FreeBSD:13:amd64/quarterly/packagesite.txz: No address record
Unable to update repository FreeBSD
Error updating repositories!
检查网络是否畅通
host -t srv _http._tcp.pkg.freebsd.org
参考
https://www.truenas.com/community/threads/tutorial-how-to-install-plex-in-a-freenas-11-2-jail.19412/
💘 相关文章
- linux stdio.h: No such file or directory的解决方法
- typora 配置picgo-core出现env: node: No such file or directory的解决方法
- supervisor Error: File contains no section headers的解决方法
- rclone error listing directory not found的解决方法
- error: exec: "apparmor_parser": executable file not found in $PATH错误
- Yarn install command error No such file or directory: 'install'的解决方法
- unzip End-of-central-directory signature not found 错误的解放方法
- Change the user's home directory for centos
- pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2的解決方法