"pkg: pkg is not installed" even after installing it

Matthew Seaman matthew at FreeBSD.org
Mon Jan 11 07:20:08 UTC 2016


On 11/01/2016 03:10, Perry Hutchison wrote:
> That doesn't produce any output, either.  However, after mounting
> tmpfs on /var/db/pkg and /var/cache, I got:

Hmmm... that's certainly a bug.  Could you open an issue at
https://github.com/freebsd/pkg/issues please, explaining exactly what
you did and what happened (or didn't as the case may be)?  pkg(8)
shouldn't die quietly in those or any circumstances.

>   # chroot -u 0 -g 0 -G 105,0,5,20,25 /mnt pkg-static add /usr/local/pkg/pkg.txz
>   Installing pkg-1.5.4...
>   Extracting pkg-1.5.4: 100%
>   ldconfig: mkstemp(/var/run/ld-elf.so.hints.6wHhnd): Read-only file system
>   pkg-static: POST-INSTALL script failed
>   Message for pkg-1.5.4:
>   If you are upgrading from the old package format, first run:
> 
>     # pkg2ng
> 
>   # chroot -u 0 -g 0 -G 105,0,5,20,25 /mnt pkg -N
>   pkg: 1 packages installed
> 
> This time it installed a bunch of stuff in /usr/local and a
> "local.sqlite" in /var/db/pkg -- but nothing in /var/cache,
> so maybe that isn't needed when installing from a tarball
> that is already local.

That looks to have worked.  Yes, if you use pkg add to install from a
tarball directly on your system already, /var/cache/pkg isn't needed.
However, it will be necessary as soon as you do anything like 'pkg
update' or 'pkg install'.

Curious as to why you're using an older version of pkg there -- we're up
to 1.6.2 nowadays.

	Cheers,

	Matthew


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 957 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20160111/6d00317e/attachment.sig>


More information about the freebsd-questions mailing list