linuxcrypt, linux, oss

Ubuntu + Asking For CD-ROM When Running “apt-get install”

So if you have installed Ubuntu server, you know that you will be running installs from the command line. The best way to do this is:

“sudo apt-get install openssh-server” (without quotes)

I just used openssh-server as it does not come installed out of the box with the 6.06 LTS release which is what I run on my server. Well, any package you try to install, it will inevitably lookto install it from the CD-ROM first because that’s the first source in your /etc/apt/sources.list file. This is an easy fix. All you need to do is open the file, comment out the cd-rom source, save and update. I will show you how. Just do the following from your console:

$ sudo vi /etc/apt/sources.list

Use your down arrow key until your cursor is over the “d” for screen2jpg.jpg

Now, press the letter “i” this will put you in insert mode. Input a pound sign “#” to comment it out.

screen3.jpg

Then press the “ESC” on your keyboard, this will take you out of insert mode.

Then save the file, there are two ways to do this, I just press “SHIFT ZZ” So holding down the “shift” key, then I press the letter “z” twice.

The other method is to  press “ESC” then press “SHIFT :” then enter the letter “w” then a bang “!” To write the file

Now you want to run an update as you have changed the file, so run a

$ sudo apt-get update

Then you are good to go, it won’t look for a cd-rom anymore when you install applications via “apt-get install”.

~j

3 Responses to “Ubuntu + Asking For CD-ROM When Running “apt-get install””

  1. fr0 November 11, 2007 at 2:01 pm #

    Thanks.

  2. Matthew November 16, 2007 at 9:13 am #

    Thanks, wonderfully elegant explanation.

  3. kasperk December 15, 2007 at 11:44 am #

    A thing I couldn’t live without, since i got no cd-rom in my server.

Leave a Reply:

Gravatar Image