在FreeBSD 8.4中,pkg install无法正常显示错误。
$ pkg install git
pkg:No active remote repositories configured.
pkg_add -r application_name 正在运行并且从端口安装它也可以正常工作但是对于上述问题,是否有任何解决方案?
答案 0 :(得分:2)
我发现链接说/etc/pkg/FreeBSD.conf中的远程仓库不存在! 所以我们必须创建一个。
$ vim /etc/pkg/FreeBSD.conf
FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
还需要在 / usr / share / keys / pkg / trusted /
中创建证书https://svn0.us-west.freebsd.org/base/head/share/keys/pkg/trusted/pkg.freebsd.org.2013102301$ mkdir -p /usr/share/keys/pkg/trusted
$ wget https://svn0.us-west.freebsd.org/base/head/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 --no-check-certificate -O /usr/share/keys/pkg/trusted/pkg.freebsd.org.2013102301
现在,我们可以更新pkg并查看我们是否有回购:
/usr/share/keys/pkg/trusted $ pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100% 968 B 1.0kB/s 00:01
Fetching packagesite.txz: 100% 5 MiB 98.8kB/s 00:56
Processing entries: 100%
FreeBSD repository update completed. 24610 packages processed.