Certbot installation with Homebrew 2021

Help: certbot installation

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:
localhost (i.e. I'm trying to get a certificate working on a local development platform)

I ran this command:
certbot --version

It produced this output:
OSError: ctypes.util.find_library() did not manage to locate a library called 'augeas'
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/folders/ss/cl31s5td5110tr014jm0hfw80000gn/T/tmp_w27udop/log or re-run Certbot with -v for more details.

My web server is (include version)
Apache2.0 Handler under a Homebrew installation

The operating system my web server runs on is (include version):
macOS 11.5.2

My hosting provider, if applicable, is:
N/A

I can login to a root shell on my machine (yes or no, or I don't know):
Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):
No

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):
Just the problem: I haven't been able to install certbot

The contents of the logfile suggested with the problem command prepended is:
(base) ~ 627 $certbot -v
An unexpected error occurred:
OSError: ctypes.util.find_library() did not manage to locate a library called 'augeas'
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/folders/ss/cl31s5td5110tr014jm0hfw80000gn/T/tmp4p1mxncu/log or re-run Certbot with -v for more details.

CONTENTS OF LOGFILE:

2021-12-21 20:50:58,533:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/usr/local/bin/certbot", line 33, in
sys.exit(load_entry_point('certbot==1.22.0', 'console_scripts', 'certbot')())
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot/main.py", line 19, in main
return internal_main.main(cli_args)
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot/_internal/main.py", line 1593, in main
plugins = plugins_disco.PluginsRegistry.find_all()
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot/_internal/plugins/disco.py", line 241, in find_all
plugin_ep = cls._load_entry_point(entry_point, plugins, with_prefix=False)
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot/_internal/plugins/disco.py", line 261, in _load_entry_point
plugin_ep = PluginEntryPoint(entry_point, with_prefix)
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot/_internal/plugins/disco.py", line 60, in init
self.plugin_cls: Type[interfaces.Plugin] = entry_point.load()
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/pkg_resources/init.py", line 2465, in load
return self.resolve()
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/pkg_resources/init.py", line 2471, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot_apache/_internal/entrypoint.py", line 3, in
from certbot_apache._internal import configurator
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot_apache/_internal/configurator.py", line 31, in
from certbot_apache._internal import dualparser
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot_apache/_internal/dualparser.py", line 4, in
from certbot_apache._internal import augeasparser
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot_apache/_internal/augeasparser.py", line 74, in
from certbot_apache._internal import parser
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/certbot_apache/_internal/parser.py", line 16, in
from augeas import Augeas
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/augeas/init.py", line 35, in
from augeas.ffi import ffi, lib
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/augeas/ffi.py", line 47, in
lib = ffi.dlopen("augeas")
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _make_ffi_library(self, name, flags)
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/cffi/api.py", line 832, in _make_ffi_library
backendlib = _load_backend_lib(backend, libname, flags)
File "/usr/local/Cellar/certbot/1.22.0/libexec/lib/python3.10/site-packages/cffi/api.py", line 827, in _load_backend_lib
raise OSError(msg)
OSError: ctypes.util.find_library() did not manage to locate a library called 'augeas'
2021-12-21 20:50:58,533:ERROR:certbot._internal.log:An unexpected error occurred:
2021-12-21 20:50:58,533:ERROR:certbot._internal.log:OSError: ctypes.util.find_library() did not manage to locate a library called 'augeas'

Installation seemed to proceed alright with Homebrew:
(base) ~ 625 $brew install certbot

==> Downloading https://ghcr.io/v2/homebrew/core/augeas/manifests/1.12.0_1

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/augeas/blobs/sha256:83b60962039b8d9

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/dialog/manifests/1.3-20211214

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/dialog/blobs/sha256:7162a6c5041dd65

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/certbot/manifests/1.22.0

######################################################################## 100.0%

==> Downloading https://ghcr.io/v2/homebrew/core/certbot/blobs/sha256:93735ba15ab5b9

==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256

######################################################################## 100.0%

==> Installing dependencies for certbot: augeas and dialog

==> Installing certbot dependency: augeas

==> Pouring augeas--1.12.0_1.big_sur.bottle.tar.gz

:beer: /usr/local/Cellar/augeas/1.12.0_1: 473 files, 3.6MB

==> Installing certbot dependency: dialog

==> Pouring dialog--1.3-20211214.big_sur.bottle.tar.gz

:beer: /usr/local/Cellar/dialog/1.3-20211214: 14 files, 925.2KB

==> Installing certbot

==> Pouring certbot--1.22.0.big_sur.bottle.tar.gz

:beer: /usr/local/Cellar/certbot/1.22.0: 1,970 files, 19MB

==> Running brew cleanup certbot...

Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.

Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew).

I don't have any Apple experience, let alone HomeBrew, but I can tell you the following: Let's Encrypt does not allow certificates to be issued for local hostnames. All hostnames in a Let's Encrypt certificate need to be publicly available. Or do you have something else in mind, i.e., running a local ACME server or something?

Thank you much.

Yes, I did indeed have in mind to install a certificate for localhost, or at least for virtual machines in my local domain. So apparently my fear on reading some of the docs that this was not possible was justified. Thanks for emphasizing this. Actually the naive reason for wanting this was so I can locally develop a web site, and treat all URLs for it as secure (i.e. beginning with the schema https:) as I develop; then I upload unchanged pages to my hosting provider.

This all granted, I'd still like to get certbot running and will use a publicly available domain to get a certificate. The installation bu is still there. I just have to make some other adjustments, to set up a DMZ, for instance, first before certification. I have also to find out what you mean by an ACME server.

Thanks, again.

There's some documentation available on how to make and trust your own localhost certificates:

(Even though it's not really related to Let's Encrypt, I guess it's a common enough request for somebody to have written up info on it anyway.)

But basically, since localhost for you isn't the same as localhost for me, it doesn't make sense for a public CA to issue such certificates.

3 Likes

If you own a real domain, this is very possible.
[albeit, not via HTTP authentication]

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.