Encountering difficulties while attempting to install Grafana from the APT repository on Debian Bookworm.
Despite following the steps outlined in the Official Manual Install Grafana on Debian or Ubuntu | Grafana documentation
Steps Followed:
- Installation of prerequisite packages:
- Importing the GPG key:
sudo mkdir -p /etc/apt/keyrings/
wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
- Adding a repository for stable or beta releases:
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
- Updating the list of available packages:
sudo apt-get update
Encountered Error:
Upon executing the command to install Grafana, the following error is displayed:
root@DEB-SystemPr-f02f74b24382:~# sudo apt-get install grafana
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package grafana is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'grafana' has no installation candidate
After adding a repository for beta releases
echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com beta main" | sudo tee -a /etc/apt/sources.list.d/grafana.list
deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com beta main
and attempting the installation again, another error surfaces:
root@DEB-SystemPr-f02f74b24382:~# sudo apt-get install grafana
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
musl
The following NEW packages will be installed:
grafana musl
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 115 MB of archives.
After this operation, 430 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://deb.debian.org/debian bookworm/main amd64 musl amd64 1.2.3-1 [406 kB]
Err:2 https://apt.grafana.com beta/main amd64 grafana amd64 11.0.0-preview
404 Not Found [IP: 151.101.130.217 443]
Fetched 406 kB in 1s (768 kB/s)
E: Failed to fetch https://apt.grafana.com/pool/main/g/grafana/grafana_11.0.0%7epreview_amd64.deb 404 Not Found [IP: 151.101.130.217 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Also try with --fix-missing
root@DEB-SystemPr-f02f74b24382:~# sudo apt-get update --fix-missing
Hit:1 https://download.docker.com/linux/debian bookworm InRelease
Hit:2 https://packages.grafana.com/oss/deb stable InRelease
Hit:3 http://deb.debian.org/debian bookworm InRelease
Hit:4 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:5 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:6 https://nvidia.github.io/libnvidia-container/stable/deb/amd64 InRelease
Hit:7 https://nvidia.github.io/libnvidia-container/stable/debian10/amd64 InRelease
Hit:8 http://deb.debian.org/debian bookworm-backports InRelease
Hit:9 https://apt.grafana.com stable InRelease
Hit:10 https://apt.grafana.com beta InRelease
Hit:11 http://fai-project.org/download bookworm InRelease
Reading package lists... Done
W: https://packages.grafana.com/oss/deb/dists/stable/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
root@DEB-SystemPr-f02f74b24382:~# sudo apt-get install grafana
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
musl
The following NEW packages will be installed:
grafana musl
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 115 MB/115 MB of archives.
After this operation, 430 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 https://apt.grafana.com beta/main amd64 grafana amd64 11.0.0-preview
404 Not Found [IP: 151.101.66.217 443]
E: Failed to fetch https://apt.grafana.com/pool/main/g/grafana/grafana_11.0.0%7epreview_amd64.deb 404 Not Found [IP: 151.101.66.217 443]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
root@DEB-SystemPr-f02f74b24382:~#
Sources List
root@DEB-SystemPr-f02f74b24382:~# cat /etc/apt/sources.list
# These lines should work for many sites
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# repository that may contain newer fai packages for bookworm
deb http://fai-project.org/download bookworm koeln
deb http://deb.debian.org/debian bookworm-backports main contrib non-free
root@DEB-SystemPr-f02f74b24382:~# cat /etc/apt/sources.list.d/grafana.list
deb https://packages.grafana.com/oss/deb stable main
deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main
deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com beta main
root@DEB-SystemPr-f02f74b24382:~#
Environment Details
root@DEB-SystemPr-f02f74b24382:~# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@DEB-SystemPr-f02f74b24382:~# uname -r
6.5.0-0.deb12.4-amd64
root@DEB-SystemPr-f02f74b24382:~#