No such file or directory

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: restorativemedia.org

I ran this command: certbot --apache

It produced this output: -su: /usr/bin/certbot: No such file or directory

My web server is (include version): Apache/2.4.29 (Ubuntu)

The operating system my web server runs on is (include version): Ubuntu 18.04.5 LTS

My hosting provider, if applicable, is:

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):
root@web:/etc/apache2/sites-available# certbot --version
-su: /usr/bin/certbot: No such file or directory

1 Like

well – did you install certbot? how?

1 Like

yes. like this

root@web:~# snap install --classic certbot
2020-08-27T10:26:43-07:00 INFO Waiting for automatic snapd restart…
certbot 1.7.0 from Certbot Project (certbot-eff✓) installed
root@web:~# certbot --apache
-su: /usr/bin/certbot: No such file or directory

1 Like

@bmw Another certbot snap issue. I couldn’t find an open or closed issue about this. Google only returns this thread if I search for the error. Any idea?

1 Like

The general problem here is that your PATH has another certbot entry before the Certbot snap.

Run hash -r and try again.

If that doesn’t work, make sure to remove any other Certbot installations on your system and update your PATH environment variable so that command -v certbot prints /snap/bin/certbot.

2 Likes

okay. I did that and am getting an error about DNS malfunctioning. I’ll go chase down that problem right now. thanks!

2 Likes

Good to know! I assume this can only occur if one already had certbot installed through another installation method besides snap and consequently removed it in the same shell environment? If I read the hash man-page correctly, its scope is just the current shell environment.

Correct me if I’m wrong, but wouldn’t that produce an other error, if any?

1 Like

Maybe! I honestly don’t entirely understand how that all works. If this becomes a reoccurring problem and we figure that out, we can update our snap installation instructions to avoid it.

It certainly could result in a different error or the other Certbot installation running successfully.

I thought the “/usr/bin/certbot: No such file or directory” output could have come from a broken Certbot installation at that path, but you’re probably right and it was instead just an issue about the command certbot referring to that location in the current shell despite the installation no longer existing there.

2 Likes