1

NOTE: I'm very new to Ubuntu (I'm a CentOs person)

I tried to install to openssh-server but I got:

root@5b4ca6d66450:/home# apt-get install openssh-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package openssh-server

Now when I check my /etc/apt/sources.list, I get:

root@5b4ca6d66450:/home# cat /etc/apt/sources.list
deb http://deb.debian.org/debian jessie main
deb http://deb.debian.org/debian jessie-updates main
deb http://security.debian.org jessie/updates main

I next add the following line -- but I still get the same results

deb http://deb.debian.org/debian jessie contrib

Anything obvious that I'm doing incorrectly?

2 Answers 2

7

There is nothing wrong with the sources.list file, but you probably need to update your local package database with apt-get update before being able to run the install command, as apt-get install doesn't do automatically.

(you're in a Debian, by the way, not Ubuntu, though it doesn't change anything for this).

1

It's not gonna make much of a difference though. You could use new human friendly version of apt which is color enabled, progress bar, editing the sources and others. Some of them are:

$ sudo apt update
$ sudo apt install <package-name>
$ sudo apt upgrade
$ sudo apt edit-sources

And yes, you are using Debian not Ubuntu.

You must log in to answer this question.

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