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

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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

2 Answers 2

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.