Try to update to 8.13.2

Creating a bug report/issue

Required Information

  • DietPi version | 8.12
  • Distro version | echo $G_DISTRO_NAME $G_RASPBIAN
  • SBC model | Raspberry Pi 4

Additional Information (if applicable)

  • Software title | Plex
  • Was the software title installed freshly or updated/migrated? updated

Steps to reproduce

  1. sudo dietpi-update
  2. .error below

Expected behaviour

  • Continue without errors

Actual behaviour

 Failed to fetch https://downloads.plex.tv/repo/deb/dists/public/InRelease
│ Certificate verification failed: The certificate is NOT trusted. The
│ certificate issuer is unknown.  Could not handshake: Error in the
│ certificate verification. [IP: 104.18.19.96 443]

can you try following

eval curl -sSfL 'https://downloads.plex.tv/plex-keys/PlexSign.key' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-plexmediaserver.gpg --yes
eval echo 'deb https://downloads.plex.tv/repo/deb/ public main' > /etc/apt/sources.list.d/plexmediaserver.list
apt update
dietpi@DietPi:~$ eval curl -sSfL 'https://downloads.plex.tv/plex-keys/PlexSign.key' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-plexmediaserver.gpg --yes
gpg: can't create '/etc/apt/trusted.gpg.d/dietpi-plexmediaserver.gpg': Permission denied
gpg: no valid OpenPGP data found.
gpg: dearmoring failed: Permission denied
curl: (77) error setting certificate verify locations:  CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs

That what i get…

Pls do this as user root or use sudo

The same error i get

can you share the entire error message pls.

apt update

Or you mean the Permission denied message?

dietpi@DietPi:~$ sudo apt update
Err:1 https://downloads.plex.tv/repo/deb public InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 104.18.19.96 443]
Err:2 https://download.docker.com/linux/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 52.85.158.79 443]
Err:3 https://deb.debian.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
Err:4 https://archive.raspberrypi.org/debian bullseye InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 46.235.230.122 443]
Err:5 https://deb.debian.org/debian bullseye-updates InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
Err:6 https://deb.debian.org/debian-security bullseye-security InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
Err:7 https://deb.debian.org/debian bullseye-backports InRelease
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
22 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: https://downloads.plex.tv/repo/deb/dists/public/InRelease: No system certificates available. Try installing ca-certificates.
W: https://download.docker.com/linux/debian/dists/bullseye/InRelease: No system certificates available. Try installing ca-certificates.
W: https://deb.debian.org/debian/dists/bullseye/InRelease: No system certificates available. Try installing ca-certificates.
W: https://archive.raspberrypi.org/debian/dists/bullseye/InRelease: No system certificates available. Try installing ca-certificates.
W: https://deb.debian.org/debian/dists/bullseye-updates/InRelease: No system certificates available. Try installing ca-certificates.
W: https://deb.debian.org/debian-security/dists/bullseye-security/InRelease: No system certificates available. Try installing ca-certificates.
W: https://deb.debian.org/debian/dists/bullseye-backports/InRelease: No system certificates available. Try installing ca-certificates.
W: Failed to fetch https://deb.debian.org/debian/dists/bullseye/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
W: Failed to fetch https://deb.debian.org/debian/dists/bullseye-updates/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
W: Failed to fetch https://deb.debian.org/debian-security/dists/bullseye-security/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
W: Failed to fetch https://deb.debian.org/debian/dists/bullseye-backports/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
W: Failed to fetch https://download.docker.com/linux/debian/dists/bullseye/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 52.85.158.79 443]
W: Failed to fetch https://downloads.plex.tv/repo/deb/dists/public/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 104.18.19.96 443]
W: Failed to fetch https://archive.raspberrypi.org/debian/dists/bullseye/InRelease  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 46.235.230.122 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.

Thats the full … response

Ok the certificate issue is with ALL apt package source and not with Plex only. Can you try following:

sudo apt install ca-certificates
sudo apt install ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20210119).
0 upgraded, 0 newly installed, 0 to remove and 22 not upgraded.
dietpi@DietPi:~$ dietpi@DietPi:~$ sudo apt install ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
ca-certificates is already the newest version (20210119).

It seems i have the latest version of certificates.

Try to force the reinstall

sudo apt install --reinstall ca-certificates
sudo apt update
dietpi@DietPi:~$ sudo apt install --reinstall ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 22 not upgraded.
Need to get 158 kB of archives.
After this operation, 0 B of additional disk space will be used.
Err:1 https://deb.debian.org/debian bullseye/main arm64 ca-certificates all 20210119
  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
W: https://deb.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20210119_all.deb: No system certificates available. Try installing ca-certificates.
E: Failed to fetch https://deb.debian.org/debian/pool/main/c/ca-certificates/ca-certificates_20210119_all.deb  Certificate verification failed: The certificate is NOT trusted. The certificate issuer is unknown.  Could not handshake: Error in the certificate verification. [IP: 146.75.2.132 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

When i try to reinstall i get this

ok let’s try to disable https for this repository to be able to reinstall ca-certificates.

sudo sed -i 's/https/http/g' /etc/apt/sources.list
sudo apt install --reinstall ca-certificates
sudo apt update
dietpi@DietPi:~$ sudo sed -i 's/https/http/g' /etc/apt/sources.list
dietpi@DietPi:~$ sudo apt install --reinstall ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 22 not upgraded.
Need to get 158 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 ca-certificates all 20210119 [158 kB]
Fetched 158 kB in 0s (915 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
dpkg: error: error trying to open /var/lib/dpkg/info/format: Bad message
E: Sub-process /usr/bin/dpkg returned an error code (2)
dietpi@DietPi:~$

Maybe some issues with corrupted data. Can you check for kernel error messages

lsblk -o name,fstype,label,size,ro,type,mountpoint,partuuid,uuid

well try to force some file system check on next reboot

> /forcefsck
reboot
# then after reboot
journalctl -t systemd-fsck
dietpi@DietPi:~$ sudo journalctl -t systemd-fsck
-- Journal begins at Wed 2023-02-01 20:32:14 GMT, ends at Wed 2023-02-01 20:41:11 GMT. --
Feb 01 20:32:14 DietPi systemd-fsck[169]: e2fsck 1.46.2 (28-Feb-2021)
Feb 01 20:32:14 DietPi systemd-fsck[169]: /dev/mmcblk0p2: clean, 179621/938400 files, 1476354/3756032 blocks
Feb 01 20:32:22 DietPi systemd-fsck[332]: fsck.fat 4.2 (2021-01-31)
Feb 01 20:32:22 DietPi systemd-fsck[332]: /dev/mmcblk0p1: 370 files, 65083/258077 clusters

this is failing still?

dietpi@DietPi:~$ sudo apt install --reinstall ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 32 not upgraded.
Need to get 158 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 ca-certificates all 20210119 [158 kB]
Fetched 158 kB in 0s (925 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 74571 files and directories currently installed.)
Preparing to unpack .../ca-certificates_20210119_all.deb ...
Unpacking ca-certificates (20210119) over (20210119) ...
Setting up ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Processing triggers for ca-certificates (20210119) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.

Now working just fine.
Should I do update the dietpi?

run following first to switch back to https protocol.

sudo sed -i 's/http/https/g' /etc/apt/sources.list
sudo apt update