For posterity:
I managed to fix the problem using this post: https://forums.freebsd.org/threads/re-getting-installing-pkg-with-a-broken-pkg.73902/ and more specifically this command :
The cause: I forgot I messed with repositories while trying to get the iphone usb sharing to work on my router, unsuccessfully. I recently saw that I get a seg fault while running the update, even though I could update opnsense to 27.1 then 27.2. Probably got an incompatible version of either pkg or one of its dependencies from the freebsd repo.
I managed to fix the problem using this post: https://forums.freebsd.org/threads/re-getting-installing-pkg-with-a-broken-pkg.73902/ and more specifically this command :
Code Select
pkg-static bootstrap -f
The cause: I forgot I messed with repositories while trying to get the iphone usb sharing to work on my router, unsuccessfully. I recently saw that I get a seg fault while running the update, even though I could update opnsense to 27.1 then 27.2. Probably got an incompatible version of either pkg or one of its dependencies from the freebsd repo.