Please note that
/usr/local/bin/lego is not a directory, but the resulting full path to the binary. The
/usr/local/bin directory should already exist on your instance, so it wouldn't be needed to create it manually.
As of right now, the latest version of the lego tool is 2.5.0, so the exact commands that you need to execute are:
curl -Ls https://api.github.com/repos/xenolf/lego/releases/latest | grep browser_download_url | grep linux_amd64 | cut -d '"' -f 4 | wget -i -
tar xf lego_v2.5.0_linux_amd64.tar.gz
sudo mv lego /usr/local/bin/lego
Please ensure you copy & paste them correctly and line by line. This error:
could have been caused by adding an extra trailing
If the above doesn't solve your issue, could you please provide some more details or screenshots of the error that you are getting?
Otherwise, if you manage to fix this issue, please continue with the rest of the steps in order to obtain your SSL certificate.