Can't update DietPi ("failed to fetch...") Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
DonLiborio
Posts: 27
Joined: Mon May 15, 2017 8:34 pm

Can't update DietPi ("failed to fetch...")

Post by DonLiborio »

How can I fix this error when running dietpi-update:

Code: Select all

- 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: Failed to fetch
│ https://packages.sury.org/php/pool/main/p/php7.4/php7.4-json_7.4.16-1+0~2021
│ 0305.42+debian9~1.gbpbbe65e_armhf.deb  404  Not Found
│ E: Failed to fetch
│ https://packages.sury.org/php/pool/main/p/php7.4/php7.4-opcache_7.4.16-1+0~2
│ 0210305.42+debian9~1.gbpbbe65e_armhf.deb  404  Not Found
│ E: Failed to fetch
│ https://packages.sury.org/php/pool/main/p/php7.4/php7.4-readline_7.4.16-1+0~
│ 20210305.42+debian9~1.gbpbbe65e_armhf.deb  404  Not Found
│ E: Failed to fetch
│ https://packages.sury.org/php/pool/main/p/php7.4/php7.4-cli_7.4.16-1+0~20210
I went to, for example, https://packages.sury.org/php/pool/main/p/php7.4/, and there are no 7.4.16 files, only 7.4.18.
Last edited by DonLiborio on Sun May 02, 2021 11:45 pm, edited 1 time in total.
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Can't update DietPi ("failed to fetch...")

Post by Joulinar »

Hi,

you would need to update the PGP key for the PHP repository

https://github.com/MichaIng/DietPi/issues/4219

Code: Select all

apt-key del '95BD4743'
curl -sSfL 'https://packages.sury.org/php/apt.gpg' -o /etc/apt/trusted.gpg.d/dietpi-php.gpg
/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update
apt upgrade
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DonLiborio
Posts: 27
Joined: Mon May 15, 2017 8:34 pm

Re: Can't update DietPi ("failed to fetch...")

Post by DonLiborio »

Now the update is running, thanks!
User avatar
MichaIng
Site Admin
Posts: 2917
Joined: Sat Nov 18, 2017 6:21 pm

Re: Can't update DietPi ("failed to fetch...")

Post by MichaIng »

Strange, that should have been done automatically via pre-patches, all but cleaning the cache, which should not be required :?.

@DonLiborio from which DietPi version did you update?
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Can't update DietPi ("failed to fetch...")

Post by Joulinar »

@MichaIng
we had a couple of cases where apt-cache clean was needed to do the final step after PGP key renewal
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
DonLiborio
Posts: 27
Joined: Mon May 15, 2017 8:34 pm

Re: Can't update DietPi ("failed to fetch...")

Post by DonLiborio »

MichaIng wrote: Mon May 03, 2021 12:57 am Strange, that should have been done automatically via pre-patches, all but cleaning the cache, which should not be required :?.

@DonLiborio from which DietPi version did you update?
From v6.34.3
User avatar
MichaIng
Site Admin
Posts: 2917
Joined: Sat Nov 18, 2017 6:21 pm

Re: Can't update DietPi ("failed to fetch...")

Post by MichaIng »

Strange. apt-get clean only removes the cache file which is anyway rebuild with apt-get update + the updated list files contain newer package versions already. One of these assumptions is obviously wrong. I need to read into that for the future.

Most confusing is that G_AGUP itself runs apt-get clean as apt-get update can fall if the cache is malformed.

Ah @Joulinar do you mean dietpi-set_software apt-cache clean? That also removes the pain text package list files, probably those get stuck somehow when apt-get update fails one time due to expired key.
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Can't update DietPi ("failed to fetch...")

Post by Joulinar »

@MichaIng
correct, dietpi-set_software apt-cache clean is needed
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 2917
Joined: Sat Nov 18, 2017 6:21 pm

Re: Can't update DietPi ("failed to fetch...")

Post by MichaIng »

Applied now: https://github.com/MichaIng/DietPi/comm ... 5340f7eaf4
Probably this is something we should add to the beta and current master branch directly as well? It's not really a change to the DietPi code deployed on the system, but a change to the update server, if you want, as this file is pulled in a separate request. But at least once we had a user that complained master branch having a commit not being done to dev branch ;).
User avatar
Joulinar
Posts: 4504
Joined: Sat Nov 16, 2019 12:49 am

Re: Can't update DietPi ("failed to fetch...")

Post by Joulinar »

if this is not breaking thinks why not 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply