Skip to main content

NetBSD - Unable to install pkgin [Resolved]

I'm running NetBSD on the Raspberry Pi 1 Model B.

uname -a
NetBSD rpi 7.99.64 NetBSD 7.99.64 (RPI.201703032010Z) evbarm

I'm trying to install pkgin but I'm receiving an error about version mismatch ...

pkg_add -f pkgin
pkg_add: Warning: package `pkgin-0.9.4nb4' was built for a platform:
pkg_add: NetBSD/earmv6hf 7.99.42 (pkg) vs. NetBSD/earmv6hf 7.99.64 (this host)
pkg_add: Warning: package `pkg_install-20160410nb1' was built for a platform:
pkg_add: NetBSD/earmv6hf 7.99.58 (pkg) vs. NetBSD/earmv6hf 7.99.64 (this host)
pkg_add: Can't create pkgdb entry: /var/db/pkg/pkg_install-20160410nb1: Permission denied
pkg_add: Can't install dependency pkg_install>=20130901, continuing
pkg_add: Warning: package `libarchive-3.3.1' was built for a platform:
pkg_add: NetBSD/earmv6hf 7.99.59 (pkg) vs. NetBSD/earmv6hf 7.99.64 (this host)
pkg_add: Can't create pkgdb entry: /var/db/pkg/libarchive-3.3.1: Permission denied
pkg_add: Can't install dependency libarchive>=3.2.1nb2, continuing
pkg_add: Can't create pkgdb entry: /var/db/pkg/pkgin-0.9.4nb4: Permission denied
pkg_add: 1 package addition failed

How can I install the correct version?


Asked April 21, 2017
Tags: netbsd, pkgsrc
Posted Under: Unix Linux
6 views
1 Answers

pkg_add should be run with superuser privileges. su - to root and install sudo, then sudo pkg_add ....


Answered April 21, 2017
 
You're right. I was logged into 3 different rpi's all using the same netbsd image. The one I was having issues on wasn't logged in as root. – BugHunterUK 15 mins ago
 CanDoerz  1 week ago
 
@BugHunterUK I don't think you were running as root. Root wouldn't have had those permission denied errors. – Kusalananda yesterday
 CanDoerz  1 week ago
 
Ok will try this, but I was running as root already. Why is sudo required if running as root? – BugHunterUK yesterday
 CanDoerz  1 week ago
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA