Skip to content
Advertisement

Snap and certbot, unknown command ‘unset’

I’m trying to set up Let’s Encrypt certificates on an ec2 instance for the first time and have run into an error which I cannot find a resolution for online. I’m using the official certbox nginx guide, and am at the step where I need to install the route53 dns plugin. However, when I run sudo snap install certbot-dns-route53, I get the following error:

error: cannot perform the following tasks:

  • Run hook prepare-plug-plugin of snap “certbot” (run hook “prepare-plug-plugin”: error: error running snapctl: unknown command `unset’. Please specify one command of: get, restart, set, start or stop)

The only solution I can find online that mentions this issue says to update snap. But snap has already been updated. Anyone familiar enough with snap and certbot on amzn2 to know what I can do here?

A bit more information: This is running on an ec2 instance running Amazon’s Linux 2 AMI (amzn2) Output for snap --version:

snap   2.36.3-0.amzn2
snapd  2.36.3-0.amzn2
series 16
amzn   2
kernel 4.14.214-160.339.amzn2.x86_64

I have tried to update the core using the commands in the guide, sudo snap install core; sudo snap refresh core and it outputs:

snap “core” has no updates available

Advertisement

Answer

I initially installed snap (since it wasn’t available simply via yum) following the instructions found here. If you’ve done that and found this question, uninstall it.

Either switch your instance to a different distro or follow the install guide offered by Amazon here. If you’re using nginx, you can simply replace the reference of python2-certbot-apache with python-certbot-nginx. I stopped following after certbot was installed.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement