pkg
pkg copied to clipboard
base package installation in a jail has failed (killed)
pkg version 2.2.1 and 2.0.5
In a jail:
>pkg install FreeBSD-src
All repositories are up to date.
DBG(1)[31332]> (db) want to get an advisory lock on a database
DBG(1)[31332]> (db) found stale pid 31321 in lock database, my pid is: 31332
DBG(1)[31332]> (db) no concurrent processes found, cleanup the lock
DBG(1)[31332]> (db) want to get an advisory lock on a database
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libarchive.so.7
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libc.so.7
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libcrypto.so.30
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libelf.so.2
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libjail.so.1
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libm.so.5
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libssl.so.30
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libthr.so.3
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libutil.so.9
DBG(1)[31332]> (solver) for package: pkg cannot find provide for requirement: libz.so.6
DBG(1)[31332]> (solver) problem has no requests
DBG(1)[31332]> Binary> loading /var/cache/pkg/FreeBSD-src-14.snap20250903105521~5ded83bb46.pkg
Checking integrity...DBG(1)[31332]> (jobs) check integrity for 1 items added
done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
FreeBSD-src: 14.snap20250903105521 [basepkgs14]
Number of packages to be installed: 1
The process will require 858 MiB more space.
Proceed with this action? [y/N]:
DBG(1)[31332]> (jobs) execute
DBG(1)[31332]> (db) want to upgrade advisory to exclusive lock
Killed
Jail config:
ip6.addr = "$WSIF|$WSADDR";
# use casual ip4
ip4="inherit";
allow.raw_sockets = 1;
exec.consolelog = "/var/log/jails/${name}_console.log";
allow.mount;
allow.set_hostname = 0;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
exec.clean;
mount.devfs;
May be I missed some jail settings.
To install package base jails you have to set allow.chflags = true; on the jail, because some files in the base system are to be installed with the system immutable flag. Also to use pkg -j <jail> successfully (e.g. from exec.poststart = "…") the jail has to be populated enough to run the relevant pkg command. A installation normally implies fetching which requires configured DNS, correct clock, an indexed X.509 root certificate list to validate the package CDN HTTPS server's certificate, the repository configuration(s) and the code signing pubkey.