I've got a fresh copy of Ubuntu Server 15.04 and installed it via "Easy Install" in VMWare WorkStation 12.

After it installed,i've logged in to my account and tried to install apache2 with this command:

sudo apt-get install apache2

and got this message:

media change: please insert the disc labled Ubuntu-server 15.04 Vivid Vervet - Release amd64 (20150422) in the drive '/media/cdrom/' and press enter

I'm sure that the internet connection is okay. But how can I avoid this error and install apache2?

I have installation ISOl I can use it as CD, also, I have an internet connection to download, and I can ping google.com successfully.

media error on Ubuntu Server

  • Don't post images when text will do. copy and paste the text (commands and output) from your terminal instead. Text is searchable, editable, re-usable and legible in any screen size. It also works for vision impaired users. Images are none of those things. – cas Mar 19 '16 at 2:49
  • well...i am not able to copy them.im not connecting with PUTTY...i am using VMWare on my laptop – Ali SH Mar 19 '16 at 9:38

You need to edit your /etc/apt/sources.list. Simply open it in your text editor, and comment the lines referring to cdrom sources; for example:

deb cdrom:[Ubuntu 15.04 _Vivid Vervet_.../ vivid main restricted

Save and exit, then run apt-get update and apt-get install apache2 again.

This happened by default since you installed from CD.

  • well,thanks,it fixed that error, but now i have this one : i.stack.imgur.com/shQni.png – Ali SH Mar 18 '16 at 23:56
  • Did you sudo apt-get update first? – Will Mar 19 '16 at 0:21
  • Also can you show me the output of dpkg --get-selections | grep hold? You can edit your question and put it there if there's many lines. – Will Mar 19 '16 at 0:22
  • 1
    thanks.i did update but for any reason... a restart fixed the problem. – Ali SH Mar 19 '16 at 0:34
  • BTW, remove some /etc/apt/sources.list.d/* files. Because they has been expired. – PersianGulf Mar 19 '16 at 1:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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