0

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?
Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407

2 Answers2

0

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
thefourtheye
  • 4,922
  • 2
  • 26
  • 32
dschinn1001
  • 3,863
0

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

thefourtheye
  • 4,922
  • 2
  • 26
  • 32