[Bug 256176] /usr/sbin/pkg: Fails with bogus error when run by unprivileged user: pkg: failed to extract pkg-static: Can't unlink already-existing object

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 07 Sep 2025 20:17:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=256176

Seyed Pouria Mousavizadeh Tehrani <p.mousavizadeh@protonmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |p.mousavizadeh@protonmail.c
                   |                            |om

--- Comment #1 from Seyed Pouria Mousavizadeh Tehrani <p.mousavizadeh@protonmail.com> ---
Same error after upgrading to 16-CURRENT:
% pkg -d bootstrap -f     
pkg: Warning: Major OS version upgrade detected.  Running "pkg bootstrap -f"
recommended
pkg(8) is already installed. Forcing reinstallation through pkg(7).
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:16:amd64/latest,
please wait...
pkg: Error fetching
https://pkg.FreeBSD.org/FreeBSD:16:amd64/latest/Latest/pkg.pkg: Not Found
A pre-built version of pkg could not be found for your system.
Bootstrapping pkg from
pkg+https://pkg.FreeBSD.org/FreeBSD:16:amd64/kmods_latest, please wait...
pkg: Error fetching
https://pkg.FreeBSD.org/FreeBSD:16:amd64/kmods_latest/Latest/pkg.pkg: Not Found
A pre-built version of pkg could not be found for your system.
Bootstrapping pkg from https://pkg.spmzt.net/packages/FreeBSD:16:amd64, please
wait...
Verifying signature with public key /usr/local/etc/ssl/certs/poudriere.cert.a..
done
pkg: failed to extract pkg-static: Can't unlink already-existing object

-- 
You are receiving this mail because:
You are the assignee for the bug.