Running Virtualmin install script fails

SYSTEM INFORMATION
OS type and version Ubuntu 24.04 LTS

I’m getting this error. Any idea what the problem is?

Does your system have working network? That looks like it failed to download our key.

Can you run the following on that server and successfully fetch the key?

curl https://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-7

What do you have logged in virtualmin-install.log file?

Do not clean install on Ubuntu 20.04 in 2025! Ubuntu 24.04 is the right choice!

1 Like

I’m able to download the key running curl https://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-7.

I’m running a fresh install of Ubuntu 24.04 LTS on a Hostinger VPS (I mistyped earlier when I said 20.04 LTS).

I created the installation file on the server as follows:

touch install.sh

Then I copied and pasted the contents of the script downloaded from my account page, set the permissions:

chmod 755 install.sh

and ran it with:

./install.sh

However, I’m still encountering the same error.
Network connectivity seems fine — I can successfully ping external hosts and run nslookup, which returns valid name resolution results.

Can you show us the last 20 lines of the virtualmin-install.log file?

This what i see:

2025-10-17 12:15:56 URL:https://software.virtualmin.com/lib/slib.sh [27087/27087] → “slib.sh” [1]
[2025-10-17 12:15:56 UTC] [INFO] Installation log is written to /usr/local/src/virtualmin-install.log
[2025-10-17 12:15:56 UTC] [DEBUG] LOG_ERRORS_FATAL=1
[2025-10-17 12:15:56 UTC] [DEBUG] LOG_LEVEL_STDOUT=INFO
[2025-10-17 12:15:56 UTC] [DEBUG] LOG_LEVEL_LOG=DEBUG
[2025-10-17 12:16:15 UTC] [DEBUG] Phase 1 of 4: Check
[2025-10-17 12:16:15 UTC] [INFO] Spin pid is: 1192
Syncing system time ..
.. done
[2025-10-17 12:16:15 UTC] [INFO] Checking system time: [2025-10-17 12:16:15 UTC] [INFO] Success.
[2025-10-17 12:16:25 UTC] [INFO] Spin pid is: 1519
Checking for Perl … found Perl at /usr/bin/perl
[2025-10-17 12:16:25 UTC] [INFO] Checking Perl installation: [2025-10-17 12:16:25 UTC] [INFO] Success.
[2025-10-17 12:16:26 UTC] [INFO] Spin pid is: 1548
Checking for an update for a set of CA certificates ..
Reading package lists…
Building dependency tree…
Reading state information…
ca-certificates is already the newest version (20240203).
0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.
.. done
[2025-10-17 12:16:26 UTC] [INFO] Checking CA certificates package: [2025-10-17 12:16:26 UTC] [INFO] Success.
[2025-10-17 12:16:27 UTC] [INFO] Spin pid is: 1598
Checking for HTTP client .. found /usr/bin/wget -nv
[2025-10-17 12:16:27 UTC] [INFO] Checking HTTP client: [2025-10-17 12:16:27 UTC] [INFO] Success.
[2025-10-17 12:16:27 UTC] [INFO] Spin pid is: 1626
Checking for GPG .. found GPG command
[2025-10-17 12:16:27 UTC] [INFO] Checking GPG package: [2025-10-17 12:16:27 UTC] [INFO] Success.
[2025-10-17 12:16:28 UTC] [DEBUG] Phase 2 of 4: Setup
[2025-10-17 12:16:28 UTC] [DEBUG] Install mode: full
[2025-10-17 12:16:28 UTC] [DEBUG] Product: Virtualmin Professional
[2025-10-17 12:16:28 UTC] [DEBUG] virtualmin-install.sh version: 7.5.2
[2025-10-17 12:16:28 UTC] [DEBUG] Checking for fully qualified hostname ..
[2025-10-17 12:16:28 UTC] [DEBUG] Hostname is fully qualified as srv1068964.hstgr.cloud
[2025-10-17 12:16:28 UTC] [DEBUG] Setting hostname to srv1068964.hstgr.cloud
[2025-10-17 12:16:28 UTC] [DEBUG] Hostname is fully qualified as srv1068964.hstgr.cloud
[2025-10-17 12:16:28 UTC] [DEBUG] Primary address detected as 148.230.94.9
[2025-10-17 12:16:28 UTC] [DEBUG] Entry for IP 148.230.94.9 exists in /etc/hosts.
[2025-10-17 12:16:28 UTC] [DEBUG] Updating with new hostname.
[2025-10-17 12:16:28 UTC] [DEBUG] Installing serial number and license key into /etc/virtualmin-license
[2025-10-17 12:16:28 UTC] [DEBUG] Operating system name: Ubuntu
[2025-10-17 12:16:28 UTC] [DEBUG] Operating system version: 24.04
[2025-10-17 12:16:28 UTC] [DEBUG] Operating system type: ubuntu
[2025-10-17 12:16:28 UTC] [DEBUG] Operating system major: 24
[2025-10-17 12:16:28 UTC] [DEBUG] Configuring package manager for Ubuntu 24.04 ..
[2025-10-17 12:16:28 UTC] [DEBUG] apt-get repos: virtualmin
[2025-10-17 12:16:28 UTC] [DEBUG] Installing Webmin and Virtualmin package signing keys ..
[2025-10-17 12:16:28 UTC] [INFO] Spin pid is: 1712
[2025-10-17 12:16:28 UTC] [INFO] Downloading Virtualmin 7 key: [2025-10-17 12:16:28 UTC] [INFO] Success.
[2025-10-17 12:16:28 UTC] [INFO] Spin pid is: 1740
gpg: can’t open ‘RPM-GPG-KEY-virtualmin-7’: No such file or directory
gpg: Total number processed: 0
[2025-10-17 12:16:28 UTC] [INFO] Installing Virtualmin 7 key: [2025-10-17 12:16:28 UTC] [INFO] Failed with error: 2
[2025-10-17 12:16:29 UTC] [ERROR] Something went wrong. Exiting.
[2025-10-17 12:16:29 UTC] [ERROR] The last few log entries were:

What is the output of the following command on your system?

grep -Rsi gpgvcommand /etc/apt

when i run grep -Rsi gpgvcommand /etc/apt nothing comes up

I was able to install Virtualmin GPL using the following command:

wget http://software.virtualmin.com/gpl/scripts/install.sh

However, when I tried to upgrade the license using my serial number and key, I encountered an error:

sudo virtualmin change-license --serial YOUR_SERIAL_NUMBER --key YOUR_LICENSE_KEY

I then manually edited the /etc/virtualmin-license file and added my serial number and key.

Despite that, when I run apt-get update, it still doesn’t pull from the Virtualmin Pro repositories.

Could you please check under my account whether my serial number and license key are still valid? When I log into my account, they appear to be active.

Thank you.

You definitely have active licenses.

Something is weird about this system and we need to figure out what. I’m baffled by the behavior you’re seeing, though, as I don’t think anyone has ever reported this exact kind of misbehavior.

If it helps here are the specs of this hostinger VPS

I don’t think it has anything to do with specs. I’m assuming it’s something weird about their OS image. But, I don’t even know where to start looking for what.

Like, in the past we’ve seen hosts that run some sort of “hardening” script on their VMs, where /tmp doesn’t allow execution, which would break the install script and its libraries (which download and run out of /tmp), but that’s not what this looks like.

I honestly don’t know what this looks like.

It doesn’t make sense because the process is the same. And, I just did a clean new install of Virtualmin Pro on Ubuntu 24.04, and it worked just fine!

I could try that to double-check!

I just tried Ubuntu 24.04 on Hostinger and it worked just fine for me! One shot, no errors.

1 Like

I was able to install it using the Virtualmin GPL install script, but the installation fails when I try to use my Virtualmin Pro install script that I downloaded from my account.

Could you please share the detailed steps you followed for your installation? I’ll copy and paste the same commands on my end, then replace them with my own license key and serial number.

Thank you.

There weren’t really any steps. I just right-clicked the download link in my “virtualmin.com → My Account”, it copied the download command to the clipboard, then I pasted it to Hostinger via the browser SSH console and ran sh virtualmin-install.sh. Installation process completed successfully, and even the host SSL certificate request worked out of the box.

Hostinger provided a pretty good and simple experience. I kind of liked it for its simplicity.

Hmm, I’m wondering if it might be my serial number and key. Can I share them with you so you can try it out?

You definitely shouldn’t share your license info in the forum. We (admins) can see your license details.

But, we know that what you see in your license page is valid because the download server authenticates directly to the same database as the license manager in the website, there’s no way for it to have wrong information. It’s possible something is being corrupted in copy/pasting or by your shell, perhaps?