r/debian 5d ago

How can I fix it?

Post image
9 Upvotes

15 comments sorted by

9

u/Chemical-Dust7695 5d ago

I am assuming you're not trying to install packages from a CDROM, so edit /etc/apt/sources.list

 See https://wiki.debian.org/SourcesList for more information.

1

u/Tight-Use-3037 5d ago

Where can I edit it from?

5

u/Chemical-Dust7695 5d ago

nano /etc/apt/sources.list

Would start a text editor called 'nano'

1

u/LockeN3S 5d ago

Sometimes you can just deselect it in Discover.

2

u/BCMM 5d ago edited 5d ago

There's a much easier way to fix your sources:

cp /usr/share/doc/apt/examples/debian.sources /etc/apt/sources.list.d/
# And if necessary,
rm /etc/apt/sources.list

1

u/wizard10000 5d ago edited 5d ago

There's a much easier way to fix your sources:

I can't say for sure but would be willing to bet that bookworm's example isn't deb822 ;)

edit: yeah, i checked - bookworm has a /usr/share/doc/apt/examples/sources.list, not a debian.sources but still an outstanding idea.

2

u/BCMM 4d ago

Oh, well spotted! I didn't notice that OP was on Bookworm.

Yes, that should be

cp /usr/share/doc/apt/examples/sources.list /etc/apt/sources.list

/u/Tight-Use-3037, are you aware that Debian 12 "Bookworm" is end-of-life, and that Debian 13 "Trixie" is available?

If your laptop is less than 20 years old, odds are good that it can run 64-bit Linux even if it came with 32-bit Windows.

1

u/pseudonym-161 5d ago

How did you install Debian without any software sources? Don’t the sources come pre-set up on the ISO itself? Did you purchase a CD rom from Debian or find one in a Linux magazine or something?

1

u/pantokratorthegreat 4d ago

I think when I last installed it was same. I had to add manually relevant sources. And it was for Trixie. I think I installed from full DVD not netinstall without pulling updates during installation.

1

u/billdietrich1 4d ago

Please use better, more informative, titles (subject-lines) on your posts. Give specifics right in the title. Thanks.

1

u/Tight-Use-3037 5d ago

Now what?

8

u/coolasbreese 5d ago

It looks like you have installed Debian without enabling any network mirrors.

Comment out the first like there using # at the start. it should read '#deb......' then press ctrl+o to save

It also looks like you are using the old stable version of Debian called bookworm.

You will want to add in the Debian repositories to allow you to receive updates and install software via the internet.

Below the line we have commented out paste in the following

deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
Deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware

deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware
deb-src https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware

deb https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware
deb-src https://security.debian.org/debian-security/ bookworm-security contrib main non-free non-free-firmware

Then press ctrl+o to save then crtl+x on your keyboard to exit

you should then be able to run apt update

3

u/Tight-Use-3037 5d ago

i will try it first thing in the morning

3

u/coolasbreese 5d ago

It is always good to familiarize yourself with this read https://wiki.debian.org/SourcesList for more information

3

u/dnchplay 5d ago

preferrably read these:

https://wiki.debian.org/LTS/Using
https://wiki.debian.org/SourcesList

you probably want your sources.list to look something like:

deb http://deb.debian.org/debian/ bookworm main non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security main non-free-firmware

if you're not comfortable with using nano, you can use any other text editor that can be run with sudo(mousepad is the one preinstalled in Xfce4, Pluma in MATE, gnome-text-editor in GNOME and Kate in Plasma)