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 downloaded the package and went through the installation process. I was first prompted with the license. There was an unclickable button which, as the tutorial said, I had to click. So I closed the terminal, relogged and tried writing the same apt-get command, the result was:

sam@ubuntu:~$ sudo apt-get install sun-java6-jdk
[sudo] password for sam: 
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?

How do I continue the process and, well this is embarrassing, how do I "approve" the license?

share|improve this question

marked as duplicate by Jorge Castro, Eric Carvalho, Seth, Uri Herrera, Florian Diesch Feb 26 '13 at 7:10

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.

add comment

2 Answers 2

up vote 1 down vote accepted

Regarding the locking problem: Perhaps closing the terminal has not killed the apt-get process. You might take a look at the output of 'ps axuw' to see if there are other apt-get processes running. If there is a left-over apt-get-process you could try to kill it (kill -9 xxxx, where xxxx is the process number).

Thr clicking problem: do you have scrolled to the end of the license?

share|improve this answer
add comment

Here is a procedure of what I did (I ran apt-get on on terminal and terminated it gracefully):

xxxx@yyy:~$ ps ax | grep apt-get
14660 pts/1    S+     0:00 sudo apt-get update
14661 pts/1    S+     0:00 apt-get update
14819 pts/2    S+     0:00 grep --color=auto apt-get
xxxx@yyy:~$:~$ sudo killall -15 14660 14661
[sudo] password for xxxx: 
14660: no process found
14661: no process found
xxxx@yyy:~$:~$ sudo killall -15 apt-get
xxxx@yyy:~$:~$ 

I don't know why using proc id didn't kill it and spit errors but proc name killed it!

share|improve this answer
    
The man -k killall commands explains why process id didn't work for you: $ man -k killall killall (1) - kill processes by name ... ` –  waltinator Oct 4 '11 at 0:52
    
Thanks, I didn’t dig that much –  Stefano Oct 4 '11 at 5:40
add comment

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