Certbot Installation Using Snapd

Hi I am following the instructions to install snapd so SSLs will autorenew versus using the Centos7 instructions.

The step where I run sudo certbot --apache I get certbot: command not found

My domain is: I have multiple domains. orcaaccounting.com was set up by a previous engineer not using snap (so wondering if that is an issue). I uninstalled that version of certbot like the instructions said and followed accordingly. I want to set up macdougall.ninja as well as other domains on this server.

I ran this command: When I run “sudo certbot --apache” I get “sudo: certbot: command not found” | yet snap install --beta --classic certbot "snap “certbot” was already ran and installed certbot no?

echo $PATH

/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/var/lib/ snapd/snap /bin:/home/orca/.local/bin:/home/orca/bin

So looks like snapd is in PATH.

When I run

sudo snap run certbot

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apachectl configtest.

httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.modules.d/10-php.conf: Cannot load modules/libphp5.so into server: /lib64/libc.so.6: version `GLIBC_2.18’ not found (required by /snap/core18/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6)

Certbot doesn’t know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run “certbot certonly” to do so. You’ll need to manually configure your web server to use the resulting certificate.

So looks like it’s having problems configuring my webserver.

Finally, when I run,

sudo snap run certbot
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running apachectl configtest.

httpd: Syntax error on line 56 of /etc/httpd/conf/httpd.conf: Syntax error on line 6 of /etc/httpd/conf.modules.d/10-php.conf: Cannot load modules/libphp5.so into server: /lib64/libc.so.6: version `GLIBC_2.18’ not found (required by /snap/core18/current/usr/lib/x86_64-linux-gnu/libstdc++.so.6)

Certbot doesn’t know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run “certbot certonly” to do so. You’ll need to manually configure your web server to use the resulting certificate.

My web server is (include version): httpd.x86_64 2.4.6-90.el7.centos

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

My hosting provider, if applicable, is: Self Hosted

I can login to a root shell on my machine (yes or no, or I don’t know): yes, I work off the root shell

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): When I run yum list installed I do not see certbot in the list. Yet, shouldn’t it have been installed when I ran sudo snap install --beta --classic certbot? as per instructions.
Yet, when I run certbot --version I see certbot 1.5.0

:thought_balloon:

Hi @0rcaCPA,

What would happen if you run sudo apachectl configtest?
If that still gives an issue, that means there’s something wrong with your apache.
If not, you might want to submit a help ticket on https://github.com/certbot/certbot/issues/

1 Like

Result = “Syntax OK”
thanks for the command, I didn’t know that. I was doing “sudo httpd configtest” but that doesn’t work. but now you taught me “sudo apachectl” configtest. Like apache control, controling an apache helicopter! I mean web portal that I control.
:grinning:

1 Like

Hi,

I’m not familiar with snap, so ping @schoen for some insights…

2 Likes

I’ve reproduced the issue and created https://github.com/certbot/certbot/issues/8093.

2 Likes

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