在FreeBSD 8.4系统上,我使用EZjail和PKGNG(pkg)来维护端口。
pkg在主机上工作正常,但拒绝更新jails中的软件。
pkg -j 5 version -v给出所需的输出,例如
ImageMagick-6.7.3.4 < needs updating (index has 6.9.0.4,1) ORBit2-2.14.19 < needs updating (index has 2.14.19_1)
但是当我运行pkg -j 5 upgrade或者pkg -j 5 upgrade [portname]我得到以下消息:
No active remote repositories configured.
我在那个监狱里面安装了pkg,问题是完全一样的(当然,在监狱里面运行时没有-j参数。
可能是什么问题呢?
问题是在监狱里面,版本库目录是空的,不像主机上的/ etc / pkg /目录。 在这个主机上的目录是一个名为FreeBSD.conf的文件,它定义了存储库。
这个文件是在主机上自动生成的,但不是在监狱里。 (尽pipepkg也被安装在监狱里面,显然'pkg -j'在监狱里面寻找这个文件。
我刚把这个文件拷贝到监狱里的/ etc / pkg /目录下,现在就可以运行了。
仅供参考,这个FreeBSD.conf文件的内容:
# $FreeBSD$ # # To disable this repository, instead of modifying or removing this file, # create a /usr/local/etc/pkg/repos/FreeBSD.conf file: # # mkdir -p /usr/local/etc/pkg/repos # echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf # FreeBSD: { url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest", mirror_type: "srv", signature_type: "fingerprints", fingerprints: "/usr/share/keys/pkg", enabled: yes }