2

So I just installed Debian 9.0.0 on my PC and now I can't download packages with the Synaptic packet manager as the sources.list file under /etc/apt/ has only the DVD set.

All other lines are commented out, with this text above the 2 lines I'd like to take back in:

# Line commented out by installer because it failed to verify:

This is probably due to the fact that I wasn't connected to the Internet while installing Debian using the DVD.

Also apparently the DVD isn't detected under Debian as under /media/ it only says cdrom and cdrom0 no matter if I insert the DVD or not with both being empty. -> Not sure if that is a separate issue?

I cannot edit the sources.list file by just opening it with the texteditor as it's write-protected.
I thought about installing leafpad from here: https://packages.debian.org/stretch/amd64/leafpad/download and I'm not sure if that would help.

To me it seems that the most straight-forward way would be to open the texteditor as root, comment out the DVD sources and take the 2 security.debian.org sources back in. However I'm not sure how to do that.

I tried sudo gedit which gets me this (I translated the part after Unable to init server:):

No protocol specified
Unable to init server: Connection failed:connection buildup denied

(gedit:1297): Gtk-WARNING **: cannot open display: :0

I would greatly appreciate any help.

0

2 Answers 2

1

Since you have sudo working, you should use sudoedit:

SUDO_EDITOR="gedit -w" sudoedit /etc/apt/sources.list
0
1

You can use sudo to edit the file using a simple text editor such as nano or kate

sudo kate /etc/apt/sources.list

or if that doesn't work: sudo nano /etc/apt/sources.list

You should be able to then uncomment what you need and save.
This link will help with default lists: https://wiki.debian.org/SourcesList

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .