vicwomg / pikaraoke

Youtube-based Karaoke machine for Raspberry Pi, OSX, Windows, and Linux
GNU General Public License v3.0
461 stars 117 forks source link

[BUG] setup.sh: E: The repository ... does not have a Release file. #290

Open RecursiveFunctions opened 6 months ago

RecursiveFunctions commented 6 months ago
pi:~/pikaraoke (master) $ ./setup.sh
Are you sure you want to setup PiKaraoke? (y/n): y
Client is a Debian-based system. Installing binaries

*** RUNNING APT-GET UPDATE ***
Hit:1 http://deb.debian.org/debian bookworm InRelease
Get:2 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:3 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]        
Ign:4 https://cli.github.com/packages bookworm InRelease                       
Hit:5 http://archive.raspberrypi.com/debian bookworm InRelease                 
Err:6 https://cli.github.com/packages bookworm Release
  404  Not Found [IP: 185.199.108.153 443]
Get:7 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [127 kB]
Get:8 http://deb.debian.org/debian-security bookworm-security/main armhf Packages [125 kB]
Reading package lists... Done                           
E: The repository 'https://cli.github.com/packages bookworm 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.
ERROR: 'apt-get update' failed with error code: 0

To Reproduce Steps to reproduce the behavior: -The user must have installed at least one package from a repository that does not have a release file (in this case cli.github.com/packages bookworm release)

-run setup.sh

Platform :

Error is the same whether you run it as user or root.

RecursiveFunctions commented 6 months ago

sudo apt install --only-upgrade ffmpeg chromium-browser chromium-chromedriver -y ought to fix it

vicwomg commented 6 months ago

Thanks for looking into this! Can you explain how it works? I'm admittedly not well versed in the differences between apt-get and apt. My understanding is apt-get update will fetch all the most recent versions from the repositories.

If that is removed, how does apt know that it is fetching the latest version?

RecursiveFunctions commented 6 months ago

It doesn't, you're right. Actually I think the error handling might've been the true culprit here. ideally when running setup.sh it shouldn't exit out just because some unrelated package doesn't have a release file

vicwomg commented 6 months ago

It is intentional that the script exits if apt-get update doesn't work. I think that if a user is using an invalid repository, the user should fix that issue. Otherwise, the setup script cannot guarantee that the packages it installs will be up to date and compatible.

RecursiveFunctions commented 6 months ago
E: The repository 'https://cli.github.com/packages bookworm Release' does not have a Release file.

In my case the error actually has nothing to do with the other pikaraoke packages and continuing the setup leads to no problems.

Perhaps it could be modified to check for specific error codes that would cause problems with the installation?