Bullseye cannot update PiHole

I cannot update PiHole with the PiHole -up command from a SSH login.

Every time I run the command I get the following error.

pi@raspberrypi:~ $ pihole -up
  [βœ—] Update local cache of available packages
  Error: Unable to update package cache. Please try "sudo apt update"
pi@raspberrypi:~ $ sudo apt update
Hit:1 https://deb.debian.org/debian bullseye InRelease
Hit:2 http://archive.raspberrypi.org/debian buster InRelease                   
Ign:3 https://deb.debian.org/debian-security bullseye/updates InRelease        
Hit:4 https://deb.debian.org/debian bullseye-updates InRelease           
Err:5 https://ookla.bintray.com/debian generic InRelease
  502  Bad Gateway [IP: 35.161.19.108 443]
Err:6 https://deb.debian.org/debian-security bullseye/updates Release
  404  Not Found [IP: 146.75.30.132 443]
Reading package lists... Done
E: The repository 'https://deb.debian.org/debian-security bullseye/updates Release' does not have a Release file.
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.

PiHole 4 2GB running the latest Bullseye upgrade.

I have only upgraded the OS to Bullseye.

Thanks for any help.

Try:

sudo sed -i 's|bullseye/updates|bullseye-security|' /etc/apt/sources.list
sudo apt update

The path of the security repo has changed with Bullseye. The old one has been kept for backwards compatibility, but now it has been removed.

3 Likes

Yes and no. Yes the first line worked, no the sudo apt update failed.

pi@raspberrypi:~ $ sudo apt update
Hit:1 https://deb.debian.org/debian bullseye InRelease
Get:2 https://deb.debian.org/debian-security bullseye-security InRelease [44.1 kB]                           
Get:3 https://deb.debian.org/debian bullseye-updates InRelease [39.4 kB]                                                           
Hit:4 http://archive.raspberrypi.org/debian buster InRelease                                                                            
Err:5 https://ookla.bintray.com/debian generic InRelease                                                     
  502  Bad Gateway [IP: 35.161.19.108 443]
Get:6 https://deb.debian.org/debian-security bullseye-security/main Sources [110 kB]
Get:7 https://deb.debian.org/debian-security bullseye-security/main armhf Packages [125 kB]
Get:8 https://deb.debian.org/debian-security bullseye-security/main arm64 Packages [123 kB]
Get:9 https://deb.debian.org/debian-security bullseye-security/main Translation-en [78.7 kB]
Fetched 520 kB in 1s (449 kB/s)                                
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
14 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch https://ookla.bintray.com/debian/dists/generic/InRelease  502  Bad Gateway [IP: 35.161.19.108 443]
W: Some index files failed to download. They have been ignored, or old ones used instead.

The security repo works fine now.

Second issue: bintray.com has been shut down a year ago or so. Remove the line or file which contains this repository from /etc/apt/sources.list.d/, then repeat apt update. Not sure which software you installed from bintray.com, but as long as it is still maintained, you should check current install instructions, which will contain either a different APT repository or other download/install/update method.

As a related note, until you get apt update to complete successfully (an OS level process), the Pi-hole installer/updater won't complete.

Solve the apt update problem first, then re-run the Pi-hole update.

I guess the repo was for Speedtest CLI. Check out current install instructions (for Ubuntu/Debian) which contain removing the old APT source as well: Speedtest CLI: Internet-Geschwindigkeitstest fΓΌr die Befehlszeile

Michalng, I think the instructions to removed speedtest was the answer. I ran the first four lines and was able to get the apt update, then the sudo apt upgrade.

sudo rm /etc/apt/sources.list.d/speedtest.list
sudo apt-get update
sudo apt-get remove speedtest
sudo apt-get remove speedtest-cli

And yes JBF you were correct, once I got the apt update to work, everything else for PiHole -up worked.

Update Complete!

Current Pi-hole version is v5.9.1
Current AdminLTE version is v5.11
Current FTL version is v5.14

Thank you both for the insights. I had forgotten that I had installed speedtest. I never did get it to work.

Thanks! PiHole is up!

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