MichaIng / DietPi

Lightweight justice for your single-board computer!
https://dietpi.com/
GNU General Public License v2.0
4.91k stars 501 forks source link

Unable to update any software running apt update/upgrade #6791

Closed boterocamilo closed 1 year ago

boterocamilo commented 1 year ago

Hi everyone,

As stated in the title, I cannot update my installed software. I have tried several options: dietpi-software, apt update… I even ran dietpi-update, to see if it was an update pending to install. However, I couldn’t either submit a Bug report. See an example as follows:

root@DietPi:~# apt update
Ign:1 https://download.mono-project.com/repo/debian buster InRelease           
Ign:2 https://download.docker.com/linux/debian bookworm InRelease              
Ign:3 https://deb.nodesource.com/node_17.x bookworm InRelease                  
Ign:4 https://repo.jellyfin.org/debian bookworm InRelease                      
Ign:5 https://packages.sury.org/php bookworm InRelease                         
Ign:6 https://deb.debian.org/debian bookworm InRelease                         
Ign:7 https://archive.raspberrypi.org/debian bookworm InRelease                
Ign:8 https://dl.yarnpkg.com/debian stable InRelease                           
Ign:9 https://deb.debian.org/debian bookworm-updates InRelease
Ign:10 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:11 https://deb.debian.org/debian bookworm-backports InRelease
Ign:6 https://deb.debian.org/debian bookworm InRelease                         
Ign:9 https://deb.debian.org/debian bookworm-updates InRelease                 
Ign:1 https://download.mono-project.com/repo/debian buster InRelease           
Ign:2 https://download.docker.com/linux/debian bookworm InRelease              
Ign:5 https://packages.sury.org/php bookworm InRelease                         
Ign:3 https://deb.nodesource.com/node_17.x bookworm InRelease                  
Ign:10 https://deb.debian.org/debian-security bookworm-security InRelease      
Ign:11 https://deb.debian.org/debian bookworm-backports InRelease              
Ign:4 https://repo.jellyfin.org/debian bookworm InRelease                      
Ign:7 https://archive.raspberrypi.org/debian bookworm InRelease                
Ign:8 https://dl.yarnpkg.com/debian stable InRelease                           
Ign:6 https://deb.debian.org/debian bookworm InRelease                         
Ign:1 https://download.mono-project.com/repo/debian buster InRelease           
Ign:9 https://deb.debian.org/debian bookworm-updates InRelease                 
Ign:2 https://download.docker.com/linux/debian bookworm InRelease              
Ign:10 https://deb.debian.org/debian-security bookworm-security InRelease      
Ign:4 https://repo.jellyfin.org/debian bookworm InRelease                      
Ign:5 https://packages.sury.org/php bookworm InRelease                         
Ign:7 https://archive.raspberrypi.org/debian bookworm InRelease                
Ign:8 https://dl.yarnpkg.com/debian stable InRelease                           
Ign:3 https://deb.nodesource.com/node_17.x bookworm InRelease                  
Ign:11 https://deb.debian.org/debian bookworm-backports InRelease   
Err:6 https://deb.debian.org/debian bookworm InRelease                     
  Temporary failure resolving 'deb.debian.org'
Err:9 https://deb.debian.org/debian bookworm-updates InRelease                 
  Temporary failure resolving 'deb.debian.org'
Err:10 https://deb.debian.org/debian-security bookworm-security InRelease      
  Temporary failure resolving 'deb.debian.org'
Err:11 https://deb.debian.org/debian bookworm-backports InRelease              
  Temporary failure resolving 'deb.debian.org'
Err:2 https://download.docker.com/linux/debian bookworm InRelease              
  Temporary failure resolving 'download.docker.com'
Err:4 https://repo.jellyfin.org/debian bookworm InRelease                      
  Temporary failure resolving 'repo.jellyfin.org'
Err:5 https://packages.sury.org/php bookworm InRelease                         
  Temporary failure resolving 'packages.sury.org'
Err:1 https://download.mono-project.com/repo/debian buster InRelease           
  Temporary failure resolving 'download.mono-project.com'
Err:8 https://dl.yarnpkg.com/debian stable InRelease                           
  Temporary failure resolving 'dl.yarnpkg.com'
Err:7 https://archive.raspberrypi.org/debian bookworm InRelease                
  Temporary failure resolving 'archive.raspberrypi.org'
Err:3 https://deb.nodesource.com/node_17.x bookworm InRelease                
  Temporary failure resolving 'deb.nodesource.com'
Reading package lists... Done        
Building dependency tree... Done
Reading state information... Done
8 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch https://deb.debian.org/debian/dists/bookworm/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch https://deb.debian.org/debian/dists/bookworm-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch https://deb.debian.org/debian-security/dists/bookworm-security/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch https://deb.debian.org/debian/dists/bookworm-backports/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch https://repo.jellyfin.org/debian/dists/bookworm/InRelease  Temporary failure resolving 'repo.jellyfin.org'
W: Failed to fetch https://download.mono-project.com/repo/debian/dists/buster/InRelease  Temporary failure resolving 'download.mono-project.com'
W: Failed to fetch https://download.docker.com/linux/debian/dists/bookworm/InRelease  Temporary failure resolving 'download.docker.com'
W: Failed to fetch https://deb.nodesource.com/node_17.x/dists/bookworm/InRelease  Temporary failure resolving 'deb.nodesource.com'
W: Failed to fetch https://packages.sury.org/php/dists/bookworm/InRelease  Temporary failure resolving 'packages.sury.org'
W: Failed to fetch https://archive.raspberrypi.org/debian/dists/bookworm/InRelease  Temporary failure resolving 'archive.raspberrypi.org'
W: Failed to fetch https://dl.yarnpkg.com/debian/dists/stable/InRelease  Temporary failure resolving 'dl.yarnpkg.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.

About the bug report, I could not do it for some strange reason, see here the error:

root@DietPi:~# dietpi-update

DietPi-Update ───────────────────────────────────────────────────── Phase: Checking for available DietPi update

[ OK ] DietPi-Update | Checking IPv4 network connectivity [FAILED] DietPi-Update | Checking DNS resolver


Press any key to continue... [FAILED] DietPi-Update | Unable to continue, DietPi-Update will now terminate.

Joulinar commented 1 year ago

You have a local network issue. At least something wrong with your DNS settings. Do you use a local DNS server?

boterocamilo commented 1 year ago

You have a local network issue. At least something wrong with your DNS settings. Do you use a local DNS server?

No, I do not have a DNS server.

MichaIng commented 1 year ago

Which DNS server are you using?

cat /etc/resolv.conf

Does it help, in case, to switch to a public one?

echo 'nameserver 1.1.1.1' > /etc/resolv.conf
apt update
Joulinar commented 1 year ago

can you check the one configured

cat /etc/resolv.conf
boterocamilo commented 1 year ago

can you check the one configured

cat /etc/resolv.conf

nameserver 147.78.28.2 nameserver 147.78.28.10

MichaIng commented 1 year ago

Seems to be a local ISP, probably it has temporary issues. See whether the using Cloudflare (above) does better.

Joulinar commented 1 year ago

did you configure them manually? They seem to be unreachable

root@DietPiProd:~# dig @147.78.28.2 dietpi.com
;; communications error to 147.78.28.2#53: host unreachable
;; communications error to 147.78.28.2#53: host unreachable
;; communications error to 147.78.28.2#53: host unreachable

; <<>> DiG 9.18.19-1~deb12u1-Debian <<>> @147.78.28.2 dietpi.com
; (1 server found)
;; global options: +cmd
;; no servers could be reached

root@DietPiProd:~#

Pls try following

echo 'nameserver 1.1.1.1' > /etc/resolv.conf
apt update
boterocamilo commented 1 year ago

did you configure them manually? Pls try following

echo 'nameserver 1.1.1.1' > /etc/resolv.conf
apt update

I did change it manually as suggested. These are now the errors when running apt update:

root@DietPi:~ echo 'nameserver 1.1.1.1' > /etc/resolv.conf
apt update
Hit:1 https://download.docker.com/linux/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm InRelease                         
Get:3 https://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]       
Hit:4 https://download.mono-project.com/repo/debian buster InRelease           
Hit:5 https://deb.nodesource.com/node_17.x bookworm InRelease                  
Get:6 https://packages.sury.org/php bookworm InRelease [7539 B]                
Hit:7 https://dl.yarnpkg.com/debian stable InRelease                           
Hit:8 https://archive.raspberrypi.org/debian bookworm InRelease                
Get:9 https://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:10 https://deb.debian.org/debian bookworm-backports InRelease [56.5 kB]
Get:11 https://repo.jellyfin.org/debian bookworm InRelease [6639 B]
Get:12 https://packages.sury.org/php bookworm/main arm64 Packages [215 kB]
Reading package lists... Done                                                  
E: Release file for https://deb.debian.org/debian/dists/bookworm-updates/InRelease is not valid yet (invalid for another 4h 16min 23s). Updates for this repository will not be applied.
E: Release file for https://deb.debian.org/debian-security/dists/bookworm-security/InRelease is not valid yet (invalid for another 8h 16min 21s). Updates for this repository will not be applied.
E: Release file for https://deb.debian.org/debian/dists/bookworm-backports/InRelease is not valid yet (invalid for another 4h 16min 22s). Updates for this repository will not be applied.
E: Release file for https://repo.jellyfin.org/debian/dists/bookworm/InRelease is not valid yet (invalid for another 4h 45min 41s). Updates for this repository will not be applied.
root@DietPi:~# cat /etc/resolv.conf
nameserver 1.1.1.1
Joulinar commented 1 year ago

InRelease is not valid yet (invalid for another 4h 45min 41s).

Your system time is out of sync

/boot/dietpi/func/run_ntpd 1
apt update
boterocamilo commented 1 year ago

InRelease is not valid yet (invalid for another 4h 45min 41s).

Your system time is out of sync

/boot/dietpi/func/run_ntpd 1
apt update

Indeed. Now after running this command it worked. Thanks a lot!