TL;DR
From the console (option 8) or Diagnostics → Command Prompt:
| |
With pkg alive again, finish the pending upgrade through System → Update (or pfSense-upgrade -d), not with pkg upgrade.
The error
| |
You see it on pkg update, when installing a package, or indirectly: System → Package Manager shows up empty and System → Update cannot check versions. Sometimes the binary complaining is pfSense-repoc instead of pkg; it is the same problem.
Why it happens
pfSense is FreeBSD, and pkg is a binary dynamically linked against the system’s libssl. When the configured repository belongs to a pfSense release built on a newer FreeBSD, its packages come linked against a newer OpenSSL (libssl.so.30 = OpenSSL 3). If pkg, or pfSense-repoc, gets updated from that repo before the base system, the new binary asks for a library that does not exist on your install yet.
How you get there:
- A manual
pkg upgradefrom the shell. On pfSense you never do that. - Installing or reinstalling a package after switching the Branch in System → Update to a higher version, without upgrading.
- An upgrade interrupted halfway (typical in the 2.7.0 → 2.7.1/2.7.2 jump, when the base moved to OpenSSL 3).
- On pfSense Plus, rolling back to an older boot environment with the repo pointing at the new one (Redmine #15070).
The library name will change across releases; the mechanics and the fix stay the same.
Fix
pkg-static is the statically linked copy of pkg: it needs no libssl, which is why it works when pkg does not.
| |
If pkg-static update still fails, pkg-static -d update prints the full trace (certificates, DNS, wrong branch).
Before step 3 check the Branch under System → Update: it must be the version you want to reach, not an intermediate one. And finish the job through the GUI or with pfSense-upgrade -d: a stray pkg upgrade leaves you halfway again.
If the base system is so mixed up that even this does not fly, Netgate’s documented last resort is pkg-static upgrade -f (reinstalls everything), followed by a reboot.
Traps
pkg upgradedoes not exist on pfSense. The only supported path is System → Update /pfSense-upgrade. This whole situation is born from skipping it.- Backup first: Diagnostics → Backup & Restore. On ZFS, also a boot environment (System → Boot Environments) lets you roll back in one reboot.
- Do not copy
libssl.so.30from another FreeBSD. It circulates as a trick; it leaves the system with libraries from two releases and breaks the next upgrade. - Packages first, no. With an upgrade pending, upgrade the system and then install packages, not the other way around.
- The repo and the upgrade use HTTPS: if
certctl rehashis not enough, check the firewall’s system time and DNS.
Reference: Upgrade Troubleshooting in the Netgate documentation.