intalling gcc compiler

Asked by Kushagra Srivastava

i have been trying to install gcc compiler.
i ve given the command

~$ sudo apt-get install gcc

on my terminal. the output read that it was unable to unlock adminstration directory because it is already in use. what should i do?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu build-essential Edit question
Assignee:
No assignee Edit question
Solved by:
mycae
Solved:
Last query:
Last reply:
Revision history for this message
Best mycae (mycae) said :
#1

close any programs, such as the software centre, or synaptic that may be in use.

If the program still doesn't work, you can either manually delete the lock file, or more simply, just reboot.

also, you may want more than just gcc

sudo apt-get install build-essential

will install other bits you may need as well (eg make, some headers)

Revision history for this message
Sai Manoj Kumar Yadlapati (ysaimanojkumar) said :
#2

That message means that you are already installing some components in ubuntu, either through synaptic-package manager or ubuntu software center or update-manager etc.
It happens even while you are installin codecs.
So, better try later or restart after that task is completed(to ensure it is finished properly) and then start your command to install gcc.

Revision history for this message
Kushagra Srivastava (sriv-kush) said :
#3

Thanks mycae, that solved my question.