admin avatar

truenas出现"pkg: file:///usr/ports/packages/packagesite.pkg: No such file or directory"的解决方法

🕦 by admin





执行 pkg update -fpkg update命令时出现了下面的错误

1
2
3
4
5
6
7
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/





💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.18.3 Processed in 0ms