Solved libssl.so.8 on Raspberry Pi 3+

Hello,

I have just installed a fresh FreeBSD 12 on a Raspberry Pi 3+.
I used "FreeBSD-12.0-STABLE-arm64-aarch64-RPI3-20190103-r342709.img.xz"

Now, after the first boot, I wanted to install screen:
Code:
root@generic:~ # pkg install screen
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+http://pkg.FreeBSD.org/FreeBSD:12:aarch64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.10.5_3...
Extracting pkg-1.10.5_3: 100%
ld-elf.so.1: Shared object "libssl.so.8" not found, required by "pkg"

Okay, i uses google, and found this thread: https://forums.freebsd.org/threads/i-cant-upgrade-pkg-after-upgrading-11-2-to-12-0.68717/

But, Unfortunately, it was not the solution:

Code:
 # pkg-static del -f pkg
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
    pkg-1.10.5_3

Number of packages to be removed: 1

The operation will free 11 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling pkg-1.10.5_3...
[1/1] Deleting files for pkg-1.10.5_3: 100%
root@generic:~ # pkg upgrade
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+http://pkg.FreeBSD.org/FreeBSD:12:aarch64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.10.5_3...
Extracting pkg-1.10.5_3: 100%
ld-elf.so.1: Shared object "libssl.so.8" not found, required by "pkg"

I am thankful for every hint

Code:
root@generic:~ # uname -a
FreeBSD generic 12.0-STABLE FreeBSD 12.0-STABLE r342709 GENERIC  arm64
 
FreeBSD stable defaults to using the latest repo but on arm64 only the quarterly repo is being updated.
You need to change the default from latest to quarterly to get pkg to work:
Bash:
root@raspberry:~ # cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
        url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly"
}
 
This exact issue was demonstrated in the video "FreeBSD 11.0 Raspberry Pi 2" (@05:44) - a video published 3 years ago on the YouTube channel "Stephen's Machine Room"!

So, of course, I was surprised when I experienced this exact error today when I was attempting to install FreeBSD-12.0-STABLE-arm64-aarch64-RPI3-20190131-r343597 on my Raspberry Pi 3 more than 3 years after the video was published!

Here are the cliff notes:
Code:
root@generic:~ # ldd `which pkg` | grep libssl
root@generic:~ # cd /usr/lib
root@generic:~ # ln -s libssl.so.111 libssl.so.8
Once you're past that error: You'll experience another error caused by a missing library - the libcrypto.so.8 shared library. (This error is also demonstrated in the video referenced above!) Here are the Cliff notes to get past this error:
Code:
root@generic:~ # ldd `which pkg` | grep crypto
root@generic:~ # cd /lib
root@generic:~ # ln -s libcrypto.so.111 libcrypt.so.8
But then I experienced another error - One that I wasn't able to bypass:
Code:
root@generic:~ # pkg update
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD load error: access repo file(/var/db/pkg/repo-FreeBSD.sqlite) failed: No such file or directory
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01   
ld-elf.so.1: /usr/local/lib/libpkg.so.4: Undefined symbol "SSL_load_error_strings"
I would also appreciate any assistance getting past these errors installing FreeBSD on Raspberry Pi 3.
 
FreeBSD stable defaults to using the latest repo but on arm64 only the quarterly repo is being updated.
You need to change the default from latest to quarterly to get pkg to work:
Bash:
root@raspberry:~ # cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
        url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly"
}

Thanks, ComplexInput:

But I don't see how this answers TATool's question because the file [FONT=courier new]/usr/local/etc/pkg/repos/FreeBSD.conf[/FONT] doesn't seem to exist on new installations, AFAICT:
Code:
root@generic:/usr/ports # ls /usr/local/etc/pkg
ls: /usr/local/etc/pkg: No such file or directory
Have you got any other ideas or suggestions for getting pkg to work on FreeBSD-12.0-STABLE-arm64-aarch64-RPI3?

TIA,
 
I have just installed a fresh FreeBSD 12 on a Raspberry Pi 3+.
I used "FreeBSD-12.0-STABLE-arm64-aarch64-RPI3-20190103-r342709.img.xz"

Now i use "FreeBSD-12.0-RELEASE-arm64-aarch64-RPI3.img.xz" and it works.

At first: I didn't see the difference (above). And then I didn't understand the difference between the two different images because...
  1. I never really used FreeBSD much previously (e.g., 2004-2005) and
  2. I've been away from FreeBSD for quite a while (i.e., since 2005).
So I'm unfamiliar with the labels STABLE & RELEASE (i.e., I'm accustomed to the labels that were used previously: CURRENT & STABLE).

FYI: CURRENT & STABLE are the labels that are still referred to in The FreeBSD Handbook, 2019-01-28 Edition (Revision: 52785)

And then I thought about the date component of the first image that you used (i.e., FreeBSD-12.0-STABLE-arm64-aarch64-RPI3-20190103-r342709.img.xz) and how there isn't a date component in the second image that you used (i.e., FreeBSD-12.0-RELEASE-arm64-aarch64-RPI3.img.xz). And I realized that the first is the weekly snapshot of the STABLE branch (i.e., the Development branch of FreeBSD-12.0) and the second is the GA-release.

So I switched to the RELEASE image and now almost everything works as desired! (The Wi-Fi interface isn't detected - But that's a topic for a separate post!)

Thanks!
 
The labels -RELEASE, -STABLE and -CURRENT have been in use since the beginning. At the very least since the past 20 years I've been using FreeBSD.
 
Thanks, ComplexInput:

But I don't see how this answers TATool's question because the file /usr/local/etc/pkg/repos/FreeBSD.conf doesn't seem to exist on new installations, AFAICT:
Code:
root@generic:/usr/ports # ls /usr/local/etc/pkg
ls: /usr/local/etc/pkg: No such file or directory
Have you got any other ideas or suggestions for getting pkg to work on FreeBSD-12.0-STABLE-arm64-aarch64-RPI3?

TIA,

My bad, I should have been more clear.
The default repo is set in /etc/pkg/FreeBSD.conf and you can override it by creating a /usr/local/etc/pkg/repos/FreeBSD.conf.
Code:
root@raspberry:~ # cat /etc/pkg/FreeBSD.conf
# $FreeBSD: stable/12/usr.sbin/pkg/FreeBSD.conf 340905 2018-11-24 17:47:53Z gjb $
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
 
The labels -RELEASE, -STABLE and -CURRENT have been in use since the beginning. At the very least since the past 20 years I've been using FreeBSD.


This is an interesting omission in The FreeBSD Handbook, 2019-01-28 Edition (Revision: 52785)! In Chapter 23 it specifically references to two "development" branches...

After reading this chapter, you will know:
• ...
• The difference between the two development branches: FreeBSD-STABLE and FreeBSD-CURRENT.


And later, in the same chapter, there are two sections: One titled "Using FreeBSD-CURRENT" and the other titled "Using FreeBSD-STABLE".

But, AFAICT, the only reference to RELEASE branch, comes in Chapter 23.2.3:

Code:
# freebsd-update -r 9.1-RELEASE upgrade


So I find this in interesting omission. But thank you for enlightening me!
 
Installed FreeBSD 12 on RPI3 today. Same error. Changed repo to quarterly, upgraded pkg, upgraded the desired package (mc), still the same problem. Added openssl package. Linked libraries as in the epretorious post. Stuck at the same stage.
 
This is an interesting omission in The FreeBSD Handbook, 2019-01-28 Edition (Revision: 52785)! In Chapter 23 it specifically references to two "development" branches...




And later, in the same chapter, there are two sections: One titled "Using FreeBSD-CURRENT" and the other titled "Using FreeBSD-STABLE".

But, AFAICT, the only reference to RELEASE branch, comes in Chapter 23.2.3:

Code:
# freebsd-update -r 9.1-RELEASE upgrade


So I find this in interesting omission. But thank you for enlightening me!
I don't read this as an omission. RELEASE is not a development branch in this context. It's the end-product of development. From the first sentence in the synopsis (23.1) of the chapter 23 link you cited: "FreeBSD is under constant development between releases."

I remember being confused about the label "STABLE" at first, but, assuming that I understand it correctly now (and I think I do), STABLE means "stable" only in comparison to the CURRENT development branch, and not in comparison to the final RELEASE end-product. RELEASE is the most "stable" of the three labels, then STABLE, and finally CURRENT is the most bleeding-edge.

Nowadays, and for my limited purposes, with no deadlines or business pressures to make me push it farther, I only use the RELEASE versions. If my hardware isn't supported by a RELEASE version, then I'll either get myself some supported alternative hardware, or just wait for CURRENT changes to be debugged and eventually work their way into a future RELEASE version.
 
At first: I didn't see the difference (above). And then I didn't understand the difference between the two different images because...
  1. I never really used FreeBSD much previously (e.g., 2004-2005) and
  2. I've been away from FreeBSD for quite a while (i.e., since 2005).
So I'm unfamiliar with the labels STABLE & RELEASE (i.e., I'm accustomed to the labels that were used previously: CURRENT & STABLE).

FYI: CURRENT & STABLE are the labels that are still referred to in The FreeBSD Handbook, 2019-01-28 Edition (Revision: 52785)

And then I thought about the date component of the first image that you used (i.e., FreeBSD-12.0-STABLE-arm64-aarch64-RPI3-20190103-r342709.img.xz) and how there isn't a date component in the second image that you used (i.e., FreeBSD-12.0-RELEASE-arm64-aarch64-RPI3.img.xz). And I realized that the first is the weekly snapshot of the STABLE branch (i.e., the Development branch of FreeBSD-12.0) and the second is the GA-release.

So I switched to the RELEASE image and now almost everything works as desired! (The Wi-Fi interface isn't detected - But that's a topic for a separate post!)

Thanks!

A very handy diagram to understand what RELEASE, CURRENT and STABLE means: https://www.freebsd.org/doc/en_US.ISO8859-1/books/dev-model/release-branches.html
RELEASE is what is meant for productive systems.
STABLE and CURRENT are development branches.
 
Installed FreeBSD 12 on RPI3 today. Same error. Changed repo to quarterly, upgraded pkg, upgraded the desired package (mc), still the same problem. Added openssl package. Linked libraries as in the epretorious post. Stuck at the same stage.
I can reproduce the problem, this is what I've done to trigger / fix it:
Code:
grep url /etc/pkg/FreeBSD.conf
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
pkg upgrade -y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:aarch64/latest, please wait...
...
ld-elf.so.1: Shared object "libssl.so.8" not found, required by "pkg"

# switch to the quarterly branch
sed -i '.bak' 's/latest/quarterly/g' /etc/pkg/FreeBSD.conf 

# delete the old pkg and reinstall it from the quarterly branch
pkg-static delete -fy pkg
pkg upgrade -y
pkg info
pkg-1.10.5_5                   Package manager
 
Yeah. I've been able to fix pkg. But now I've got the same problem with libssl.so.8 and libcrypto.so.8 when running mc installed from package:

Code:
root@generic:~ # mc
ld-elf.so.1: Shared object "libssl.so.8" not found, required by "libssh2.so.1"
 
Yeah. I've been able to fix pkg. But now I've got the same problem with libssl.so.8 and libcrypto.so.8 when running mc installed from package:

Code:
root@generic:~ # mc
ld-elf.so.1: Shared object "libssl.so.8" not found, required by "libssh2.so.1"
You need to reinstall libssh2 (and probably all your ports)
 
Back
Top