LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-26-2011, 12:38 AM   #1
DxTer
LQ Newbie
 
Registered: Nov 2011
Posts: 4

Rep: Reputation: Disabled
Unhappy Problem in installing jdk


I have tried many solutions given over the internet but still getting this error.

$ apt-get install sun-java6-jdk sun-java6-jre
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
 
Old 12-26-2011, 12:42 AM   #2
klearview
Member
 
Registered: Aug 2006
Location: London
Distribution: Debian, Kubuntu
Posts: 572

Rep: Reputation: 75
sudo apt-get install sun-java6-jdk sun-java6-jre
 
Old 12-26-2011, 12:44 AM   #3
DxTer
LQ Newbie
 
Registered: Nov 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
again same problem!
 
Old 12-26-2011, 12:50 AM   #4
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
Just make sure of two things.

1) You're running the command as root or with sudo.
2) You don't have any other package management software open such as synaptic or the software center. Only one instance of apt/aptitude can run at a time, and synaptic locks it just by being open. The software center will lock it if it's installing something.
 
Old 12-26-2011, 12:55 AM   #5
DxTer
LQ Newbie
 
Registered: Nov 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
@dudeman41465
I did run the command using sudo and also restarted my system quite a bit time so I guess there are no other packages of synaptic or software center running? right?
 
Old 12-26-2011, 01:18 AM   #6
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
Quote:
Originally Posted by DxTer View Post
@dudeman41465
I did run the command using sudo and also restarted my system quite a bit time so I guess there are no other packages of synaptic or software center running? right?
If you haven't opened anything, then the command above should work just fine. Occasionally it'll fail because the update daemon will be using apt to check for updates, but that usually only takes a minute or two, so if it's still saying no, then try waiting 5 minutes and try again. If it still refuses to co-operate, and since you've rebooted, it should be safe to remove the lock files. I got that idea from this mailing list thread here.
Linkage
 
Old 12-26-2011, 01:24 AM   #7
DxTer
LQ Newbie
 
Registered: Nov 2011
Posts: 4

Original Poster
Rep: Reputation: Disabled
thank you, it's done!!
 
Old 12-26-2011, 01:46 AM   #8
dudeman41465
Member
 
Registered: Jun 2005
Location: Kentucky
Distribution: Ubuntu
Posts: 794

Rep: Reputation: 56
Quote:
Originally Posted by DxTer View Post
thank you, it's done!!
No problem, :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where to get JDK 1.5.0_08 and JDK 1.6.0_10 for Linux Redhat Itanium servers java_ascii Linux - Software 1 09-22-2009 12:17 PM
JDK Install - Problem Installing JavaNinja Linux - Newbie 5 12-11-2008 04:41 PM
installing jdk tannu_ah Linux - Newbie 5 11-17-2008 04:14 PM
problem installing jdk 1.6 in fedora 6 souvikc Linux - Newbie 7 07-27-2008 06:06 AM
problem installing SUN JDK 1.5.10 eerpini Linux - Software 5 07-25-2007 08:20 AM


All times are GMT -5. The time now is 12:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration