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

You need to install openssl:

pkg install openssl

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


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
  • 2
    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

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 agree to our terms of service, privacy policy and cookie policy