pkg
pkg copied to clipboard
pkg upgrade on a production system is dangerous
With pkg 2.2.1 on a 13.5-RELEASE-p2 and other fairly recent versions of pkg, running pkg upgrade on a production system can lead to background jobs failing, e.g. with errors like:
/usr/local/bin/rrdtool: not found
This also affects security tools such as clamassassin when it runs clamdscan.
I assume the problem is that the "Deinstalling" steps all run at the start, so files are missing for too long.
I don't remember it being so risky in the past (e.g. 2024).
This sounds vaguely like it'll be improved a lot in #2488 by @ifreund
https://pastebin.com/sNvmU3DH
[53/240] Deinstalling FreeBSD-utilities-dev-15.snap20250807020358...
[53/240] Deleting files for FreeBSD-utilities-dev-15.snap20250807020358: 100%
[54/240] Deinstalling FreeBSD-utilities-lib32-15.snap20250807020358...
[54/240] Deleting files for FreeBSD-utilities-lib32-15.snap20250807020358: 100%
[55/240] Deinstalling FreeBSD-utilities-man-15.snap20250807020358...
[55/240] Deleting files for FreeBSD-utilities-man-15.snap20250807020358: 100%
[56/240] Deinstalling FreeBSD-utilities-15.snap20250807020358...
[56/240] Deleting files for FreeBSD-utilities-15.snap20250807020358: 100%
[57/240] Deinstalling FreeBSD-yp-15.snap20250807020358...
[57/240] Deleting files for FreeBSD-yp-15.snap20250807020358: 100%
[58/240] Deinstalling FreeBSD-zfs-dev-15.snap20250807020358...
[58/240] Deleting files for FreeBSD-zfs-dev-15.snap20250807020358: 100%
[59/240] Deinstalling FreeBSD-zfs-man-15.snap20250807020358...
[59/240] Deleting files for FreeBSD-zfs-man-15.snap20250807020358: 100%
[60/240] Deinstalling apache24-2.4.64...
ELF interpreter /libexec/ld-elf.so.1 not found, error 2
ELF interpreter /libexec/ld-elf.so.1 not found, error 2
This of course lacks #2488 but that one won't eliminate the problem here.