September 21, 2024

Sweetweb – Web technologies, virtualization and video games

We talk about web technologies, virtualization, AI, Network and video games

pfSense pkg install error fix: Addressing OPENSSL & Repo Update Issues in FreeBSD

3 min read

While working with FreeBSD, one of the challenges I recently faced involved the pfSense pkg install error. Specifically, the issues revolved around the OPENSSL_3_0_9 not being found and repository update problems. In this post, I’ll detail the process of fixing the pkg install error on pfSense and offer solutions to those facing similar challenges.

The Problem:

I initially received the following error:

ld-elf.so.1: /usr/local/lib/libssl.so.30: version OPENSSL_3_0_9 required by /usr/local/sbin/pkg not found

Attempting to rectify the situation by reinstalling pkg, I was faced with another set of issues:

pkg-static install -f pkg
Updating pfSense-core repository catalogue...
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
repository pfSense-core has no meta file, using default settings
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
Unable to update repository pfSense-core
Updating pfSense repository catalogue...
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
repository pfSense has no meta file, using default settings
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
pkg-static: An error occured while fetching package
pkg-static: Impossible to get the value from Last-Modified HTTP header
Unable to update repository pfSense
Error updating repositories!

These error messages suggested that there were problems both with the OpenSSL version and with fetching updates from the pfSense repositories.

The Solution:

To address this issue, I used the following command:

pkg-static bootstrap -f

Here’s a breakdown of what this command does:

  • pkg-static: This command uses the static version of the pkg tool. The benefit of the static version is that it’s self-contained and not reliant on shared libraries, making it more resilient in situations where shared libraries might have issues (like the OpenSSL error we encountered).
  • bootstrap -f: This action forces the bootstrap process for the package manager. Bootstrapping is essentially setting up or initializing a system. By forcing the bootstrap process, we’re ensuring that pkg gets set up again from scratch, which can resolve potential corruption or configuration issues.

After running the command, I received the following:

pkg(8) is already installed. Forcing reinstallation through pkg(7).
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+https://pkg.pfsense.org/pfSense_v2_7_0_amd64-pfSense_v2_7_0, please wait...
Verifying signature with trusted certificate pkg.pfsense.org.20160406... done
Installing pkg-1.19.1_1...
package pkg is already installed, forced install
Extracting pkg-1.19.1_1: 100%

This confirmed that the pkg tool was being reinstalled and set up again on my system.

Outcome:

After completing the aforementioned steps, I found that the pkg tool started working as expected without any further errors.

If you’re encountering similar issues, I hope this step-by-step guide aids you in resolving them. Remember, always take backups before making significant changes, and if you’re unsure about a step, seek expert guidance.

About Author

More Stories

Leave a Reply