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 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 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 at 9:39

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 at 3:50
  • @arrowd No, you don't. I successfully installed it with pkg install. – Nasir Riley Oct 28 at 3:52
  • 1
    But OP isn't able to do so. You see, his pkg executable can't start. – arrowd Oct 28 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 at 0:00

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.