# Virtualmin fails to upgrade

**URL:** <https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630>\
**Category:** Virtualmin\
**Created:** [May 10, 2020, 6:40pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630 "2020-05-10T18:40:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![TimRiker](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/timriker/32/934_2.png) [@TimRiker](https://forum.virtualmin.com/u/TimRiker)\
**Post date:** [May 10, 2020, 6:40pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/1 "2020-05-10T18:40:51Z")

</div>

Running on Ubuntu 18.04 I have 6.08 installed and apt won’t upgrade to 6.09. I had to download and install the .deb manually.

$ cat /etc/apt/sources.list.d/virtualmin.list  
deb [http://software.virtualmin.com/gpl/ubuntu/](http://software.virtualmin.com/gpl/ubuntu/) virtualmin-universal main

$ sudo apt update&&sudo apt dist-upgrade  
Ign:1 [http://dl.google.com/linux/chrome/deb](http://dl.google.com/linux/chrome/deb) stable InRelease  
Hit:2 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) bionic InRelease  
Hit:3 [http://security.ubuntu.com/ubuntu](http://security.ubuntu.com/ubuntu) bionic-security InRelease  
Hit:4 [http://ppa.launchpad.net/certbot/certbot/ubuntu](http://ppa.launchpad.net/certbot/certbot/ubuntu) bionic InRelease  
Hit:5 [http://us.archive.ubuntu.com/ubuntu](http://us.archive.ubuntu.com/ubuntu) bionic-updates InRelease  
Hit:6 [http://dl.google.com/linux/chrome/deb](http://dl.google.com/linux/chrome/deb) stable Release  
Ign:7 [http://software.virtualmin.com/gpl/ubuntu](http://software.virtualmin.com/gpl/ubuntu) virtualmin-universal InRelease  
Hit:8 [http://archive.canonical.com/ubuntu](http://archive.canonical.com/ubuntu) bionic InRelease  
Get:9 [http://software.virtualmin.com/gpl/ubuntu](http://software.virtualmin.com/gpl/ubuntu) virtualmin-universal Release [9447 B]  
Get:10 [http://software.virtualmin.com/gpl/ubuntu](http://software.virtualmin.com/gpl/ubuntu) virtualmin-universal Release.gpg [195 B]  
Err:10 [http://software.virtualmin.com/gpl/ubuntu](http://software.virtualmin.com/gpl/ubuntu) virtualmin-universal Release.gpg  
The following signatures were invalid: 31D2B18872EAF68EFB81F81DE8DD3FA0A0BDBCF9  
Fetched 9642 B in 2s (5973 B/s)  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
All packages are up to date.  
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: [http://software.virtualmin.com/gpl/ubuntu](http://software.virtualmin.com/gpl/ubuntu) virtualmin-universal Release: The following signatures were invalid: 31D2B18872EAF68EFB81F81DE8DD3FA0A0BDBCF9  
W: Failed to fetch [http://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-universal/Release.gpg](http://software.virtualmin.com/gpl/ubuntu/dists/virtualmin-universal/Release.gpg) The following signatures were invalid: 31D2B18872EAF68EFB81F81DE8DD3FA0A0BDBCF9  
W: Some index files failed to download. They have been ignored, or old ones used instead.  
Reading package lists… Done  
Building dependency tree  
Reading state information… Done  
Calculating upgrade… Done  
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

---

<div class="post-metadata">

**Author:** ![DrCarsonBeckett](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/drcarsonbeckett/32/650_2.png) [@DrCarsonBeckett](https://forum.virtualmin.com/u/DrCarsonBeckett)\
**Post date:** [May 10, 2020, 9:07pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/2 "2020-05-10T21:07:58Z")

</div>

You might want to update the source.list . I am not sure, but I think its not the latest one.

```auto
http://software.virtualmin.com/vm/6/gpl/apt/
```

And btw, it wont update to 6.09 by running apt. You manually need to install that.  
Thats the link: [http://www.webmin.com/vdownload.html](http://www.webmin.com/vdownload.html)

Download it with wget and install it with `dpkg -i webmin-virtual-server_6.09.gpl_all.deb`

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [May 10, 2020, 9:44pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/3 "2020-05-10T21:44:50Z")

</div>

There are new and old repos, you’re pointing to old repos…which are signed with an old key (key ID 31D2…). If you installed when the old repos were in use, the installer would have installed the public key used to verify that signature.

Use `sudo apt-key list` to see which Virtualmin key you have. If you have the Virtualmin 6 key, you’ve downgraded your repos to the old ones. Why?

If you have no Virtualmin key listed…I’m not sure how that’d happen. I guess you removed it?

You can reinstall the key with (this is for the _old_ key):

```bash
# wget https://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin
# apt-key import RPM-GPG-KEY-virtualmin

```

If you have the new (Virtualmin 6, key ID E36F…) key listed, just fix your repo paths to point to the right ones.

---

<div class="post-metadata">

**Author:** ![TimRiker](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/timriker/32/934_2.png) [@TimRiker](https://forum.virtualmin.com/u/TimRiker)\
**Post date:** [May 11, 2020, 3:49am UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/4 "2020-05-11T03:49:44Z")

</div>

Why are there old broken repos around? Also why have the version number in the repo path when the version number is already inherent in the package file? Is there a web page that lists the correct apt-get paths for 6.0.9 gpl?

---

<div class="post-metadata">

**Author:** ![TimRiker](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/timriker/32/934_2.png) [@TimRiker](https://forum.virtualmin.com/u/TimRiker)\
**Post date:** [May 11, 2020, 3:55am UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/5 "2020-05-11T03:55:38Z")

</div>

Adding that repo also gets errors.  
Is there some good reason why the existing repo has not been fixed such that 6.0.9 gpl which is already in that repo, actually installs?

Err:9 [http://software.virtualmin.com/vm/6/gpl/apt](http://software.virtualmin.com/vm/6/gpl/apt) virtualmin-universal InRelease  
The following signatures couldn’t be verified because the public key is not available: NO\_PUBKEY D9F9010760D62A6B  
Err:11 [http://software.virtualmin.com/gpl/ubuntu](http://software.virtualmin.com/gpl/ubuntu) virtualmin-universal Release.gpg  
The following signatures were invalid: 31D2B18872EAF68EFB81F81DE8DD3FA0A0BDBCF9  
Reading package lists… Done  
W: GPG error: [http://software.virtualmin.com/vm/6/gpl/apt](http://software.virtualmin.com/vm/6/gpl/apt) virtualmin-universal InRelease: The following signatures couldn’t be verified because the public key is not available: NO\_PUBKEY D9F9010760D62A6B  
E: The repository ‘[http://software.virtualmin.com/vm/6/gpl/apt](http://software.virtualmin.com/vm/6/gpl/apt) virtualmin-universal InRelease’ is not signed.  
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.  
N: See apt-secure(8) manpage for repository creation and user configuration details.

## $ sudo apt-key list| head -n 11 Warning: apt-key output should not be parsed (stdout is not a terminal) /etc/apt/trusted.gpg

pub dsa1024 2005-07-11 [SC]  
31D2 B188 72EA F68E FB81 F81D E8DD 3FA0 A0BD BCF9  
uid [unknown] Virtualmin, Inc. [security@virtualmin.com](mailto:security@virtualmin.com)  
sub elg2048 2005-07-11 [E]

pub dsa1024 2002-02-28 [SCA]  
1719 003A CE3E 5A41 E2DE 70DF D97A 3AE9 11F6 3C51  
uid [unknown] Jamie Cameron [jcameron@webmin.com](mailto:jcameron@webmin.com)  
sub elg1024 2002-02-28 [E]

---

<div class="post-metadata">

**Author:** ![DrCarsonBeckett](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/drcarsonbeckett/32/650_2.png) [@DrCarsonBeckett](https://forum.virtualmin.com/u/DrCarsonBeckett)\
**Post date:** [May 11, 2020, 7:44am UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/6 "2020-05-11T07:44:27Z")

</div>

> [@TimRiker](#):
>
> Is there a web page that lists the correct apt-get paths for 6.0.9 gpl?

See my post [Virtualmin fails to upgrade - #2 by DrCarsonBeckett](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/2) .

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [May 11, 2020, 1:54pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/7 "2020-05-11T13:54:27Z")

</div>

The old repos are not broken. You’re missing a public key.

Edit: Hm…Actually, you seem to have the old key. No idea why it’s failing to validate signature. Have you tried `apt-get clean`?

---

<div class="post-metadata">

**Author:** ![TimRiker](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/timriker/32/934_2.png) [@TimRiker](https://forum.virtualmin.com/u/TimRiker)\
**Post date:** [May 11, 2020, 4:44pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/8 "2020-05-11T16:44:01Z")

</div>

Ah! The message:

The following signatures were invalid: 31D2B18872EAF68EFB81F81DE8DD3FA0A0BDBCF9

is due to the old key not being secure enough for the new apt. Removing the old repository source and adding the new repository key fixed the issue.

$ wget -qO- [http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-6](http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-6) | sudo apt-key add -  
Side note: It would be nice to remove RPM- from the name as this is not just for RPMs.

It would be nice if the old repository were resigned with a more secure key. I guess people have to change something to get the new key anyway.

What should be listed on Ubuntu 18.04 in apt sources? Right now I have only:

$ cat /etc/apt/sources.list.d/virtualmin.list  
deb [http://software.virtualmin.com/vm/6/gpl/apt/](http://software.virtualmin.com/vm/6/gpl/apt/) virtualmin-universal main

---

<div class="post-metadata">

**Author:** ![DrCarsonBeckett](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/drcarsonbeckett/32/650_2.png) [@DrCarsonBeckett](https://forum.virtualmin.com/u/DrCarsonBeckett)\
**Post date:** [May 11, 2020, 5:24pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/9 "2020-05-11T17:24:36Z")

</div>

I guess you could add: `deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-bionic main` too if you want.

---

<div class="post-metadata">

**Author:** ![Joe](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/joe/32/9_2.png) [@Joe](https://forum.virtualmin.com/u/Joe)\
**Post date:** [May 11, 2020, 6:03pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/10 "2020-05-11T18:03:20Z")

</div>

> [@TimRiker](#):
>
> $ wget -qO- [http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-6](http://software.virtualmin.com/lib/RPM-GPG-KEY-virtualmin-6) | sudo apt-key add -  
> Side note: It would be nice to remove RPM- from the name as this is not just for RPMs.

End users don’t generally see it or need to care about it. It is imported during installation.

> [@TimRiker](#):
>
> It would be nice if the old repository were resigned with a more secure key. I guess people have to change something to get the new key anyway.

The old repository is no longer used by the installer and hasn’t been for a couple of years. I can’t change the key without breaking it for everyone…there is no non-breaking way to do it.

> [@TimRiker](#):
>
> What should be listed on Ubuntu 18.04 in apt sources? Right now I have only:
> 
> $ cat /etc/apt/sources.list.d/virtualmin.list  
> deb [Index of /vm/6/gpl/apt](http://software.virtualmin.com/vm/6/gpl/apt/) virtualmin-universal main

How do you only have the one repo? Did you not install with the install script? It sets up both repos (universal and the distro specific one). Adding `/vm/6` to both of the old repo paths is all that is needed to go from old to new repos.

---

<div class="post-metadata">

**Author:** ![TimRiker](https://cdn.forum.virtualmin.com/user_avatar/forum.virtualmin.com/timriker/32/934_2.png) [@TimRiker](https://forum.virtualmin.com/u/TimRiker)\
**Post date:** [May 11, 2020, 8:13pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/11 "2020-05-11T20:13:14Z")

</div>

I had the old repo from the original install on Ubuntu 16.04 The machine has been upgraded to 18.04 since then. I was trying to get 6.08 to upgrade to 6.09 without losing all my settings.

> [@Joe](#):
>
> The old repository is no longer used by the installer and hasn’t been for a couple of years. I can’t change the key without breaking it for everyone…there is no non-breaking way to do it.

I see. That’s unfortunate. While the old key was valid, you could have released an update that installs the new key, then after “some time” has passed, you could re-sign the repository with the new key instead of the old one.

Unfortunately the old key appears to no longer be trusted by Ubuntu 18.04 so upgrades fail. Resigning the old repository with the new key would allow upgrades to work, but the new key would have to be manually added.

I’ve seen other vendors include both the /etc/apt/sources.list.d/\*.list file and the /etc/apt/trusted.gpg.d/\*.gpg file in the package. This allows one to manually install the .deb and then have updates automatically installed later. I’d recommend this approach.

I did run the install script, long ago. Since then I only run apt to apply updates. I generally have unattended-upgrades enabled. On dev systems I add “\*:\*” to the upgrade list so that packages from all listed repositories are upgraded automatically. On this host, the failed sha1 key was causing it to reject the Release file as it could not validate with the Release.gpg as the 3\* key, though installed, is to low security to be “trusted”.

In general, apt is the way to install updates on Debian and Ubuntu systems. Changes like repository paths should be done inside the package, either by including files as mentioned above, or less preferably, by including scripts that do modifications at package installation time.

Thanks for the help!

---

<div class="post-metadata">

**Author:** ![system](https://cdn.forum.virtualmin.com/uploads/default/original/2X/c/cd96d761e326db4b2bef94886a639109bd7a8e76.svg) [@system](https://forum.virtualmin.com/u/system)\
**Post date:** [June 10, 2020, 8:13pm UTC](https://forum.virtualmin.com/t/virtualmin-fails-to-upgrade/105630/12 "2020-06-10T20:13:16Z")

</div>

Closed on June 10, 2020, 8:13pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
