3

This question already has an answer here:

I've just installed Ubuntu Server 16.04.3. During the installing I kept getting the message:

select and install software failed

I have no idea why. I'm not an expert so I had no idea on how to find any reason why that kept happening. Anyway, the OS seemed to have installed just fine so I figured to just install OpenSSH through command line.

First I tried: sudo apt install openssh-server. That resulted in the request of the CD. So I modified etc/apt/sources.list and commented out the cdrom entry as advised here: https://ubuntuforums.org/showthread.php?t=2194719

Of course I did sudo apt-get update after. Which strangly enough returned Reading package lists... Done straight after.

After that I tried installing OpenSSH again, which resulted in:

Unable to locate package openssh-server.

So perhaps there was something wrong with my internet connection, but ifconfig gave me the network interface with the ipaddress I expected. So I think that's working fine.

Next I found some advise to run:

sudo rm var/lib/apt/lists/* and do sudo apt-get update after. Tried this, but no effect.

I have a feeling my installation simply has no repositories listed at all and therefor can't find any packages of course. Unfortunetely, if this is the case, I have no idea on how to fix it. Any advise would be welcome!

marked as duplicate by David Foerster, Community Dec 12 '17 at 9:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • cat /etc/apt/sources.list – Tomáš Pospíšek Dec 12 '17 at 7:49
  • @TomášPospíšek Only the commented CDROM – icecub Dec 12 '17 at 7:51
6

You need to tell apt where to look for updates (on the net). That means you need to add sources to your /etc/apt/sources.list.

You can have that file generated by this site here, f.ex.; https://repogen.simplylinux.ch/

Alternatively you can search "ask ubuntu", there are plenty of question about sources.list, that should be able to help you further.

  • Thank you very much! I've updated the file with that website and everything is working as expected now :) Rly saved my day! – icecub Dec 12 '17 at 8:39

Not the answer you're looking for? Browse other questions tagged or ask your own question.