1

I'm having a lot of trouble getting up and running Ubuntu Server. I just installed it on VMware and it appears it doesn't have nano. When I run sudo nano /etc/hosts it says "-bash nano: command not found" and when I try sudo apt-get install nano it says

Media change: please insert the disc labelled 'Ubuntu Server 14.04.2 LTS Trusty Tahr - release amd64 in the drive '/media/cdrom/` and press enter

This is a fresh install so if I messed something up with it I'd rather start again. I thought nano came with Ubuntu, did I select something wrong?

Celeritas
  • 113
  • 2
  • 2
  • 7

3 Answers3

2

I'm out on a limb here, but it is probably simply a matter of 1. nano not being installed and 2. misconfigured package sources.

You can try the following:

  1. Comment the cdrom-related line in /etc/apt/sources.list by adding a # in front of it, like

# deb cdrom:[Ubuntu 14.04.1 LTS _Trusty Tahr_ - Release amd64 (20140722.2)]/ trusty main

  1. Make sure you do have a Trusty repository in your /etc/apt/sources.list, e.g.

deb http://somemirror.ubuntu.com/ubuntu/ trusty main

deb-src http://somemirror.ubuntu.com/ubuntu/ trusty main

deb http://somemirror.ubuntu.com/ubuntu/ trusty-updates main

deb-src http://somemirror.ubuntu.com/ubuntu/ trusty-updates main

  1. sudo apt-get update

  2. sudo apt-get install nano

(Of course for this to work you'll have to rely on some other editor, I'm guessing vi or if you don't even have vi resort to some creative cat'ting and piping).

0

It must have some how been missed when installing the OS initially. I tried re installing and it worked fine.

Celeritas
  • 113
  • 2
  • 2
  • 7
-1

The problem seems to be the line relating to cdrom in your sources.list file. You can delete this line completely with

sudo sed -i '/cdrom/d' /etc/apt/sources.list

But perhaps it would be better (editor speaking here) to comment out the line to avoid too much destruction and make a backup in case you need it

sudo sed -i.bak '/cdrom/ s/^/#/' /etc/apt/sources.list
Zanna
  • 72,312
RpR
  • 136