Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting this error:

sathiesh@sathiesh:~$ sudo apt-get install g++
[sudo] password for sathiesh: 
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
share|improve this question

marked as duplicate by Radu Rădeanu, Kevin Bowen, Alvar, poolie, Eric Carvalho Jun 17 '13 at 2:29

This question was marked as an exact duplicate of an existing question.

Which Ubuntu release are you running? – Mitch Jun 16 '13 at 6:26

Just like it points out is another process using it?, there may be another application holding /var/lib/dpkg/lock. Instead of finding and closing that program, better restart your computer and then issue the same command. I would recommend if you are using Ubuntu 13.04

sudo apt-get install build-essential

This will install all basic tools needed for building debian packages, which includes g++ and make

share|improve this answer

Have you tried to do reinstall of gcc (together with g++) ?

As far as I know these both packages are always together ?

sudo apt-get install --reinstall gcc
share|improve this answer

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