Let's Encrypt installation script not working?

TLDR: The Let’s Encrypt installation script doesn’t seem to be running “apt-get -y install certbot” command, but gives no errors. Manually installing LE and re-running the original script works, and the “apt-get update” does work in the script, but it looks like the script exits immediately after, before LE is installed.

Long description:
I installed Jitsi yesterday on my own equipment, with a brand new Ubuntu 20.04 VM. The installation went smoothly and initial tests seem to work without any issues, so I’m really impressed. When I went back and ran the LE installation script, I’m prompted for my email address and then I see what looks like “apt-get update” running. The script (apparently) completes, and I don’t receive any error message in the shell or receive an error email, but the self-signed cert is never replaced.

I searched for the LE cert in other locations, but it’s definitely not on this server. It also looks like Let’s Encrypt never installed. So, I look at the install script and see the installation section… I manually run “apt-get -y install certbot” and it goes through the installation, which did not happen from the “install-letsencrypt-cert.sh” script. I re-run that script and this time it processes the LE renewal correctly, transfers the cert to the correct location, then I guess it restarts Nginx (if it needs to) and the LE cert is now being used.

I tested this on 2 different installations - first on a clean Ubuntu 20.04 install, and second on another VM already running that only runs Apache for a redirect. In neither case did the LE install script continue after “apt-get update” nor did it display an error message.

That is strange:

It skips it if the certbot command is already present: