Unable to update older DietPi installation

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
gobstopper
Posts: 30
Joined: Sun Jul 14, 2019 5:05 pm

Unable to update older DietPi installation

Post by gobstopper »

Hi -

I have DietPi running on an older Pi3 board which, because it does exactly what I need it to rarely gets checked.

I recently logged in and was unsurprised to find that it was letting me know there was an update available (from 6.34.3 to 6.35.0), so I duly ran dietpi-update.

However (possibly as a consequence of the amount of time I've waited to do this) the process reaches a point and then fails with the following:-

Code: Select all

APT upgrade                                                                  │
│  - Command: apt-get -qq upgrade                                              │
│  - Exit code: 100                                                            │
│  - DietPi version: v6.34.3 (MichaIng/master) | HW_MODEL: 3 | HW_ARCH: 2 |    │
│ DISTRO: 4                                                                    │
│  - Image creator: DietPi Core Team                                           │
│  - Pre-image: Raspbian Lite                                                  │
│  - Error log:                                                                │
│ E: Failed to fetch                                                           │
│ https://packages.sury.org/php/pool/main/p/php-defaults/php-common_81+0~20210 │
│ 223.34+debian9~1.gbpf52eb0_all.deb  404  Not Found                           │
│ E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing
When I tried the --fix-missing option it returned this -

Code: Select all

Hit:1 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Hit:2 https://archive.raspberrypi.org/debian stretch InRelease
Err:3 https://packages.sury.org/php stretch InRelease
  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
Reading package lists... Done
W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://packages.sury.org/php stretch InRelease: The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Failed to fetch https://packages.sury.org/php/dists/stretch/InRelease  The following signatures were invalid: EXPKEYSIG B188E2B695BD4743 DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
W: Some index files failed to download. They have been ignored, or old ones used instead.
I attempted the dietpi-update again but this resulted in the same outcome.

Can anyone advise if there's anything I can do manually to get me past this little bump.

Many Thanks.
Phil.
cloudn8ive
Posts: 6
Joined: Wed Oct 20, 2021 5:12 am

Re: Unable to update older DietPi installation

Post by cloudn8ive »

I had this same error a few months back.

Take the following with a grain of salt, as this may not be the most appropriate method to deal with the problem. For that reason, you may want to wait for a more authorative answer. This is simply what I did to the best of my recollection and a best effort to re-trace my steps.

FYI, the source for the following steps. Note that the steps below come from the comment section, not the OP. If the following doesn't work for you, there are several suggestions on that same page you might try.


From your terminal, the first thing to do is delete the expired key:

Code: Select all

apt-key del B188E2B695BD4743
Then we need to grab the new key and write it into the appropriate file:

Code: Select all

curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
Note: the options are for 'silent', 'Show errors', 'Location/follow redirects', and 'output to file'.

The instructions then call for an apt update, but I don't think that is required in our case here.

Then you should be able to do the update.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to update older DietPi installation

Post by Joulinar »

Basically follow the following. it's a known issue in old installation

Code: Select all

apt-key del '95BD4743' # delete the old key
curl -sSfL 'https://packages.sury.org/php/apt.gpg' -o /etc/apt/trusted.gpg.d/dietpi-php.gpg # download the new key
/boot/dietpi/func/dietpi-set_software apt-cache clean # clean the apt cache
apt update # update again the package cache
https://github.com/MichaIng/DietPi/issu ... -840055898

As well consider to update to Buster as you are running oldold Debian Stretch.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
gobstopper
Posts: 30
Joined: Sun Jul 14, 2019 5:05 pm

Re: Unable to update older DietPi installation

Post by gobstopper »

Thanks both of you.
As well consider to update to Buster as you are running oldold Debian Stretch
I assumed if I went through the updates that this would eventually upgrade. I was going to run dietpi-update until it informed me there were no further updates and then do an apt dist-upgrade.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Unable to update older DietPi installation

Post by Joulinar »

DietPi update will never force a Destro upgrade. This always would need to be done by the admin themselves.

https://dietpi.com/docs/usage/#how-to-upgrade-to-buster
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply