pkg update breaks pkg system

Nelson H. F. Beebe beebe at
Thu Dec 31 11:10:19 PST 2020

On a VM running DragonFlyBSD 5.9-SYNTH (DFLYVERSION=500900), I just
did a package update like this:

	# pkg-static update
	# pkg-static upgrade

and got this output:

	Updating Avalon repository catalogue...
	Fetching meta.conf: 100%    246 B   0.3kB/s    00:01    
	Fetching packagesite.txz: 100%    6 MiB   2.1MB/s    00:03    
	Processing entries: 100%
	Avalon repository update completed. 31784 packages processed.
	All repositories are up to date.
	Updating Avalon repository catalogue...
	Avalon repository is up to date.
	All repositories are up to date.
	New version of pkg detected; it needs to be installed first.
	The following 1 package(s) will be affected (of 0 checked):

	Installed packages to be UPGRADED:
		pkg: 1.14.7 -> 1.15.10 [Avalon]

	Number of packages to be upgraded: 1

	3 MiB to be downloaded.

	Proceed with this action? [y/N]: y
	[1/1] Fetching pkg-1.15.10.txz: 100%    3 MiB   3.0MB/s    00:01    
	Checking integrity... done (0 conflicting)
	[1/1] Upgrading pkg from 1.14.7 to 1.15.10...
	[1/1] Extracting pkg-1.15.10: 100%
	You may need to manually remove /usr/local/etc/pkg.conf if it is no longer needed.
	pkg-static: Failed to execute lua script: [string "args = {}..."]:11: attempt to call a nil value
	(field 'stat')
	pkg-static: lua script failed
	No active remote repositories configured.

	# pkg search pkg
	Shared object "" not found, required by "pkg"

	# pkg-static search pkg
	No active remote repositories configured.

Has anyone seen this before, and is there an easy fixup?

I fixed the missing *.so.* file problem with this temporary workaround
that I've used on multiple O/Ses in the past when similar
missing-library problems surfaced during upgrades.

	# ln -s /lib/
	# ln -s /lib/

I also tried renaming /usr/local/etc/pkg.conf to
/usr/local/etc/pkg.conf.old, but that does not change the "No active
..." output, so I put the file back under its old name.

I can easily revert to last night's snapshot of the VM, but it would
be good for all DragonFlyBSD users to know how to recover from a
broken package system (which is why I have habitually used pkg-static,
instead of pkg, in the BSD family of operating systems);

- Nelson H. F. Beebe                    Tel: +1 801 581 5254                  -
- University of Utah                    FAX: +1 801 581 4148                  -
- Department of Mathematics, 110 LCB    Internet e-mail: beebe at  -
- 155 S 1400 E RM 233                       beebe at  beebe at -
- Salt Lake City, UT 84112-0090, USA    URL: -

More information about the Users mailing list