NetBSD 'pkg_add' can't process packages: Forbidden

1.4k Views Asked by At

I'm new to using NetBSD but I've set it up on a VM and am currently in the process of running through a few package installations. From what I understand this is done via setting the PKG_PATH variable and then using the pkg_add utility, however I'm getting a "Forbidden" error message when I try to install any package.

$ PKG_PATH="http://cdn.NetBSD.org/pub/pkgsrc/packages/$(uname -s)/$(uname -m)/$(uname -r|cut -f '1 2' -d.)/All/"
$ export PKG_PATH
$ pkg_add tmux
pkg_add: Can't process http://cdn.NetBSD.org:80/pub/pkgsrc/packages/NetBSD/amd64 /7.1/All//tmux*: Forbidden
pkg_add: no pkg found for 'tmux', sorry.
pkg_add: 1 package addition failed

I've visited the URL and the package does exist, also it does this for any package I try to install. From what I can tell the networking on the machine is fine so I'm a bit stuck as to where to go from here. Any suggestions?

3

There are 3 best solutions below

0
On

On NetBSD 9.3 (guest) inside the virtual Machine qemu on Gentoo with kernel version 9.1-19 (host), I got a similar issue but instead of "forbidden", I got "Timeout on HTTPS"- Again change https -> http worked for me, as well.

0
On

I got a similar issue but instead of forbidden, I got "Unknown HTTP error" enter image description here My solution was changing from "https" to "http" and it worked for me. Hopefully that helps.

0
On

1) try $PKG_PATH without the trailing slash, i.e. .../All instead of .../All/ 2) "tmux*" doesn't make sense for http, it only makes sense for ftp. something seems fishy.

I recommend raising this on [email protected]