1

I just installed a fresh FreeBSD but when I try to install emacs with pkg install emacs, I've the following error.

ld-elf.so.1: Shared object "libssl.so.9" not found, required by "pkg".

The only thing I've done is portsnap fetch extract

Aside ls, cd and man, it's the second command on this system.

Any idea?

migrated from serverfault.com Oct 28 '18 at 1:51

This question came from our site for system and network administrators.

  • portsnap is for ports, not packages. You do not need to do that. As always, refer to the most excellent FreeBSD Handbook for information. – Rob Oct 29 '18 at 12:52
  • Which version of FreeBSD is this? I have had the same issue with 12.0-BETA2 - its related to a recent update to OpenSSL in the base system. Some parts of the system are still playing catchup. – Richard Smith Oct 30 '18 at 9:39
2

You need to install openssl:

pkg install openssl

That will provide you with libssl.so.9 which will be located here:

/usr/local/lib/libssl.so.9

After that, you can:

pkg install emacs

If pkg on your system just won't execute then you can use one of the following first:

pkg-static bootstrap -f 

pkg-static install pkg -f
  • 1
    You have to use pkg-static instead. – arrowd Oct 28 '18 at 3:50
  • @arrowd No, you don't. I successfully installed it with pkg install. – Nasir Riley Oct 28 '18 at 3:52
  • 2
    But OP isn't able to do so. You see, his pkg executable can't start. – arrowd Oct 28 '18 at 10:21
  • @arrowd This is a fresh install. Had he upgraded then pkg may have depended on dynamic libraries. If it just won't start then what he actually needs is pkg bootstrap or pkg-static install pkg. He can then use pkg with no issues so he doesn't have to use pkg-static to install emacs (which is what he is trying to) and your comment isn't providing enough information as it doesn't show anything about what actually needs to be done. – Nasir Riley Oct 29 '18 at 0:00
0

I have the same problem. And obviously the given answer doesn't work (which makes me wonder if the respondent even read the question).

 pkg install openssl
ld-elf.so.1: Shared object "libssl.so.9" not found, required by "pkg"

The response about using pkg-static is closer, but also doesn't work:

# pkg-static install openssl
Updating FreeBSD repository catalogue...
pkg-static: 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    
pkg-static: error reading public key: error:00000000:lib(0):func(0):reason(0)
pkg-static: No trusted certificate has been used to sign the repository
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: 100%    5 MiB   1.8MB/s    00:03    
pkg-static: error reading public key: error:00000000:lib(0):func(0):reason(0)
pkg-static: No trusted certificate has been used to sign the repository
Unable to update repository FreeBSD
Error updating repositories!

I had hoped the bootstrap suggestion would help, but no avail:

pkg-static install pkg -f
Updating FreeBSD repository catalogue...
pkg-static: 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    
pkg-static: error reading public key: error:00000000:lib(0):func(0):reason(0)
pkg-static: No trusted certificate has been used to sign the repository
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz:   0%
Fetching packagesite.txz: 100%    5 MiB   2.7MB/s    00:02    
pkg-static: error reading public key: error:00000000:lib(0):func(0):reason(0)
pkg-static: No trusted certificate has been used to sign the repository
Unable to update repository FreeBSD
Error updating repositories!
0

The only way I got it to work was by disabling the fingerprint and signature_type in the /etc/pkg/FreeBSD.conf, this is a known bug as per the forum and this is the only alternative I found to the ever time consuming alternative to portsnap fetch.

FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  #signature_type: "fingerprints",
  #fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

Yes, I know it makes security a concern.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.