An happy fix for the PKG Mismatch of FreeBSD 12.0 Current/Stable

Hello,

After installation of FreeBSD vers.12.0 (i386), there is an error of pkg mismatch.
If you enter 'y', then, the installation is broken, stating issue with PKG, and it is a dead end. After pressing 'y', pkg will not continue. It will missing libraries.

There was a missing file libssl and libcrypto error.

A possible workaround is to use "fetch" and populate the missing libraries into /usr/lib/

Here are the files for others that cannot install FreeBSD 12.0.

Code:
cd /usr/lib
fetch https://raw.githubusercontent.com/spartrekus/freebsd-13-entropyfix/master/libssl.so.111
fetch  https://raw.githubusercontent.com/spartrekus/freebsd-13-entropyfix/master/libcrypto.so.111

Once those files in /usr/lib, then you can try to install the 12.0 FreeBSD release. It works at least for gcc.

Good Luck!
 
Last edited by a moderator:
Yeah a completely clean, very clean installation.
I took r328126/x86 i386 because of the entropy bug. Once done, then, pkg failed. I had to find a work around, you know. Anyhow the only passing entropy is the r328126, no other single 11.2, 12.0 current, 13.0 passes it on my notebook (too brand new).

pkg-static, I will give a try.
 
Is pkg already installed or some other 3rd party SW?

You can try a force update of the repository catalog and clean your pkg cache
Code:
# pkg clean
# pkg update -f

I tried pkg clean, ok, but after mismatch again.
pkg clean
pkg update -f
fetching ... meta... packages,
... running kernel
Allow missmatch now? [Y/n] <<-- this is then broken

Yes, just installed 12.0 Freebsd, and as root
# pkg
it updates, and it goes to mismatch directly :( Quite sad.
 
Tested and here more information...

Reinstalled a new notebook, and it shows up as follows (very clean, fresh, installation).

pkg bootstrap -f
gives shared object "libssl.so.111" not found, required by "pkg"

pkg update -f
gives shared object "libssl.so.111" not found, required by "pkg"

It looks kinda dead end to me.... let hope you have any further ideas for a possible fix.
 
Tested and here more information...

Reinstalled a new notebook, and it shows up as follows (very clean, fresh, installation).

pkg bootstrap -f
gives shared object "libssl.so.111" not found, required by "pkg"

pkg update -f
gives shared object "libssl.so.111" not found, required by "pkg"

It looks kinda dead end to me.... let hope you have any further ideas for a possible fix.

use pkg-static()
 
It looks kinda dead end to me.... let hope you have any further ideas for a possible fix.
Mmh. Sounds really weird. My understanding looks like this:

After a fresh install you can use pkg bootstrap to install the pkg system with man pages on its own without adding other software. But I think that is mostly used for setup scripts.

FreeBSD ships by default with the very small package manager pkg(7) which is barely able to install the current pkg(8) manager and surrenders all responsibilty for package management to it. So running # /usr/sbin/pkg or # pkg install foo the first time the installation starts by downloading the pkg tools from a mirror. Pkg then installs the available catalog. Thats the way I use mostly.

pkg-static(8) is a static link of pkg and normally only used to install or to upgrade pkg(8) itself if it is broken by a major system upgrade. Most libraries are included in the binary. So pkg-static don't depend on libssl.so and is therefore always functional. So bart might be right that you will succeed with pkg-static install pkg or if pkg was already installed with pkg upgrade -f pkg. But Im not sure if its part of the base system after install.

So much typing of the string 'pkg' can be a little bit confusing o_O
 
I am confused about pkg and its function. I will read more about it.


Maybe the base system can be uncompressed to avoid pkg to be used.

I don't know.

HAL might help there. ;)
 
I am confused about pkg and its function. I will read more about it.

I can still understand but its maybe justified by my bad explanation skills ;).
pkg(7) and pkg(8) are two different things. Maybe this statement from the pkg(7) manpage can shed some light on
Code:
pkg is the package management tool.  It is used to manage local packages
installed from ports(7) and install/upgrade packages from remote reposi-
tories.

To avoid backwards incompatibility issues, the actual pkg(8) tool is not
installed in the base system.  The first time invoked, pkg(7) will bootstrap
the real pkg(8) from a remote repository.

pkg(8) is so speak able to install itself via pkg(7).
 
Back
Top