1

While trying to upgrade a pfSense 2.2.6 to the latest version (as described here) and running pkg, I got:

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]:

After answering Yes, I got:

Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.10.5...
Newer FreeBSD version for package pkg:
To ignore this error set IGNORE_OSVERSION=yes
- package: 1003000
- running kernel: 1001000
Allow missmatch now?[Y/n]:

I decided to risk it and answered Yes. Ultimately, installation ended with the error message:

/usr/local/lib/libpkg.so.4: Undefined symbol "openat"

That presumably means the pkg version I got is indeed not compatible with my system. Unfortunately, every further attempt to run pkg yields the same error.

How can I get rid of the incompatible pkg version again, and how can I get one that is compatible with the BSD version on my pfSense? Or is there any other way to fix this?

1
  • 1
    Have you installed ports? Try to reinstall pkg from ports '/usr/ports/ports-mgmt/pkg'. Commented Mar 13, 2018 at 19:56

1 Answer 1

2

pkgng has several fallbacks:

  • There is a statically-linked version available as pkg-static.
  • You can run the install tool again by explicitly telling it to /usr/sbin/pkg bootstrap -f.

What you need to do is tell pkg to use the FreeBSD 10.1 repository. Because your configuration file says latest it is using the FreeBSD 10.3 repository, whose softwares contain various undefined references to library functions that are not found in 10.1 or earlier, including openat and utimensat. The 10.1 ABI is not forward compatible with 10.3.

You do this by altering the appropriate .conf file in /usr/local/etc/pkg/repos/ to say a specific release instead of latest, and then re-bootstrapping pkg.

Or you can compile your own in the ports tree. But you'll still be pulling other 10.3 software from latest if you do.

Further reading

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .