I've just installed debian 9 using the full disc image (debian-9.8.0-amd64-xfce-CD-1) to install on VirtualBox in a 64bit environment from a Windows 10 host. During the installation I unchecked the desktop environment and xfce checkboxes. I kept the utilities checkbox checked. I did this as I want to be left with a lightweight installation to use as a local server.
Trying to install the 'sudo' package using apt.
I have commented out the CD-rom source and added these sources to /etc/apt/sources.list
;
deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main
deb http://ftp.debian.org/debian/ stretch-updates main non-free
deb-src http://ftp.debian.org/debian/ stretch-updates main non-free
I have then run apt update
and apt upgrade
.
Further to this is where I am encountering a problem. When I try to run apt install sudo
, I get the following:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package sud 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 'sudo' has no installation candidate
I can see that this is true when I run apt-cache policy sudo
as it shows me:
sudo:
Installed: (none)
Candidate: (none)
Version table:
sources.list
file? I believe there ismain
component missing. I think you havemain
andnon-free
versions ofstretch-updates
, but not themain
version forstretch
.sources.list
file are in the question, regardssources.list
, you should add lines formain
forstretch
too. Then do an update upgrade followed by a reboot.