Cannot Open "Software & Updates" program in Debian 11

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,771
Reaction score
1,183
Credits
13,191
NoDistroTemplateException: Error: could not find a distribution template for Debian/n/a
I am thinking you may have an error in your sources.list file or your os-release or your lsb_release file has an error
What is in your - /etc/apt/sources.list - file
What is in your - /lib/os-release - file

just open them in your text editor and paste back the results

Also have you tried to add a PPA that did not work?
 


OP
ayrton_satar

ayrton_satar

New Member
Joined
Apr 1, 2022
Messages
18
Reaction score
3
Credits
164
I am thinking you may have an error in your sources.list file or your os-release or your lsb_release file has an error
What is in your - /etc/apt/sources.list - file
What is in your - /lib/os-release - file

just open them in your text editor and paste back the results

Also have you tried to add a PPA that did not work?
In my /etc/apt/sources.list - file I have:

Code:
## Debian 11 Bullseye
deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb http://security.debian.org/debian-security/ bullseye-security main

In my /lib/os-release - file I have:

Code:
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
NAME="Debian GNU/Linux"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
 

Brickwizard

Well-Known Member
Joined
Apr 28, 2021
Messages
2,668
Reaction score
1,768
Credits
19,966
I am using:
Hewlett-Packard HP ProBook 450 G2
Component wise virtual identical to my Prodesk, this one runs Mint daily, but is also my main testing machine, over the last couple of years I have run over 50 different distributions, only the odd one or two have been a bit of work to set up
 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,771
Reaction score
1,183
Credits
13,191
PRETTY_NAME="Debian GNU/Linux bookworm/sid"
Your OS release says bookworm/sid and your sources list says bullseye - bookworm/sid will be Debian 12 - based on your sources.list the OS Release should read PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
The sources.list needs to match the os-release - you are also missing the VERSION-ID and VERSION from your os-release file

So the whole thing should look like

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Also what is the output of
Code:
lsb_release -a

once you fix the os-release file do not forget to run
Code:
sudo apt update
afterwards
 
Last edited:
OP
ayrton_satar

ayrton_satar

New Member
Joined
Apr 1, 2022
Messages
18
Reaction score
3
Credits
164
Your OS release says bookworm/sid and your sources list says bullseye - bookworm/sid will be Debian 12 - based on your sources.list the OS Release should read PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
The sources.list needs to match the os-release - you are also missing the VERSION-ID and VERSION from your os-release file

So the whole thing should look like

PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Also what is the output of
Code:
lsb_release -a

once you fix the os-release file do not forget to run
Code:
sudo apt update
afterwards

the result of
Code:
lsb_release -a
is:

Distributor ID: Debian
Description: Debian GNU/Linux bookworm/sid
Release: 11-updates
Codename: n/a

How can I fix the os-release file? I have to rewrite it?
 

Lord Boltar

Well-Known Member
Joined
Nov 24, 2020
Messages
1,771
Reaction score
1,183
Credits
13,191
That would be
Code:
sudo texteditor /etc/os-release
- where the word texteditor is your text editor (i.e) gedit, mousepad, xed or whichever you are using

Example: if you are using gedit as a text editior that would be
Code:
sudo gedit /etc/os-release
then just copy and paste whats in post #25 overwriting that section in the os-release file then save the file and close it - then run
Code:
sudo apt update
it should update, if there are updates then run
Code:
sudo apt upgrade -y
if it updates successfully then reboot and try to run you Software&Updates again
 
Last edited:
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Linux.org Hosting Donations
Consider making a donation

Members online


Top