On legacy FreeBSD systems (such as 10.1 - now end of life) you may have just upgraded pkg as normal, or had it upgraded as a side effect of trying to install some software. For example
Then been hit with the following error:
/usr/local/lib/libpkg.so.3: Undefined symbol "openat"
Is there a solution other than upgrading the operating system so that the correct libraries are linked, etc? Well there is certainly a short term solution and that is to use the static version of pkg. Neatly called pkg-static. Simply use as you would pkg for example: