Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I want to install the C++ library, but the terminal keeps asking me to insert the CD for installation. What CD?

Here is the terminal code I used to attempt to install with:

sudo apt-get install build-essential

After I enter in my password and hit y, it says: Media change

Why does it say that? Can anyone help me either with this problem or find another way to install the C++ Library? Thanks.

share|improve this question
Which version of Ubuntu do you have? 12.04? 12.10? 13.04? –  Thomas W. May 2 '13 at 22:28

1 Answer 1

It looks like this is because you've used CDs/DVDs to install your system from instead of online repositories and when you try to use the package manager it's just simply referring to those CDs.

You might want to add Ubuntu repositories in /etc/apt/sources.list or /etc/apt/sources.list.d

Default contents of /etc/apt/sources.list contents for Ubuntu Precise installed using netboot images is listed below:

deb http://archive.ubuntu.com/ubuntu precise main restricted
deb-src http://archive.ubuntu.com/ubuntu precise main restricted

deb http://archive.ubuntu.com/ubuntu precise-updates main restricted
deb-src http://archive.ubuntu.com/ubuntu precise-updates main restricted

deb http://archive.ubuntu.com/ubuntu precise universe
deb-src http://archive.ubuntu.com/ubuntu precise universe
deb http://archive.ubuntu.com/ubuntu precise-updates universe
deb-src http://archive.ubuntu.com/ubuntu precise-updates universe

deb http://archive.ubuntu.com/ubuntu precise multiverse
deb-src http://archive.ubuntu.com/ubuntu precise multiverse
deb http://archive.ubuntu.com/ubuntu precise-updates multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-updates multiverse

deb http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu precise-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu precise-security main restricted
deb-src http://security.ubuntu.com/ubuntu precise-security main restricted
deb http://security.ubuntu.com/ubuntu precise-security universe
deb-src http://security.ubuntu.com/ubuntu precise-security universe
deb http://security.ubuntu.com/ubuntu precise-security multiverse
deb-src http://security.ubuntu.com/ubuntu precise-security multiverse

Then run apt-get update and install the buil-essential package as you tried doing it earlier.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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