LinuxQuestions.org
Help answer threads with 0 replies.
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 05-17-2008, 06:46 AM   #1
ramayana
LQ Newbie
 
Registered: May 2008
Posts: 4

Rep: Reputation: 0
package management


I am completely new to Linux, I've successfully installed "etch" and KDE, am now trying to learn how to use package managers. I have tried installing Open Office (openoffice.org-core and openoffice.org-kde) with both Aptitude and KPackage but I keep getting a similar error message in both programs (this is from KPackage):

<fice.org-core' 'openoffice.org-kde' ;echo RESULT=$?
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?
RESULT=100

I have closed all other processes in the system tray, I don't know what I'm doing wrong. Thanks for any advice.

Mark
 
Old 05-17-2008, 07:03 AM   #2
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
open terminal:

su -

now:
apt-get install synaptic

logout of the computer and login. Now in your menu you will have something called synaptic (GUI). Open it and then search for openoffice.
 
Old 05-17-2008, 09:32 AM   #3
the trooper
Senior Member
 
Registered: Jun 2006
Location: England
Distribution: Debian Jessie Amd64
Posts: 1,477

Rep: Reputation: Disabled
I seem to remember that Etch installs open office by default.
Are you sure it is not installed already?
Having installed Etch on a few different machines i have never had to add open office manually.
Regards,
The Trooper.
 
Old 05-17-2008, 09:57 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Quote:
Originally Posted by ramayana View Post
<fice.org-core' 'openoffice.org-kde' ;echo RESULT=$?
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?
RESULT=100
The lock file errors seem to point that one package manager (apt) process is already running, or it was running and exited uncleanly so that the lockfile was left behind. The idea behind a lockfile is that once you start the package manager, it creates a file -- empty file usually -- called "a lockfile" to some directory (for example /var/lib/dpkg/ in this case, a file that is simply called 'lock'). Then if you try to run another instance of the package manager before the other one is closed, it finds the lockfile and refuses to start, because running two package managers at the same time could cause serious trouble -- for example the two programs could be installing or removing the same package the same time. So the lockfile is there to point out that an instance of the package manager is already running, and when that process exits, the lockfile is removed; though if the process for some reason exits so that it doesn't remove the lockfile (for example you kill it without letting it remove the file, or the program crashes), the file remains even though there is no package manager running, and this means no new package manager process wants to start.

Solution is simple: first make sure there are no package manager processes running (dpkg, apt-get, adept, synaptic, ...) and if the file still is there, simply remove it. You should not remove it if there is a package manager process running, because then another process could accidentally start and interfere with the other one, but if there are no processes, the file is "not used" by anybody. So (you need to be root to do these things, killing processes not owned by you and all:

Code:
su -
This will make you become the root user, or superuser. Type password (of root) when asked, or use 'sudo' with the commands below instead.

Code:
ps -e |grep apt
ps -e |grep dpkg
ps -e |grep adept
The above commands don't show anything (i.e. you just get a new command line) if there are no processes named apt, dpkg or adept (just three examples) running; if there are, you'll get a line per process that shows some information. For example if there was 'dpkg' running, you could kill it using
Code:
killall -q dpkg
Or by using 'kill' with the pid (process id) number, but killall does the job too - kills all processes called dpkg. Now let's assume you don't find any package manager processes running anywhere anymore. If
Code:
ls /var/lib/dpkg/lock
gives output, the file is still there. Remove it:
Code:
rm /var/lib/dpkg/lock
Now retry running adept, for example, and see if it works.

With Adept I've found this sometimes happens; the application crashes, leaving an unneeded lock file behind. Installing Synaptic (which is a front-end to the package manager just like Adept, but with a GTK interface rather than QT, so it might not sit as well into KDE desktop than Adept does - but on the other hand, Synaptic is in my opinion somewhat "more clear" in terms of usage than Adept) won't get you past the lockfile problem, but if it's Adept that causes the lockfile-leftovers, then you might get less headache using Synaptic. If you are fine with it's outlooks and the interface, go ahead, it won't harm anyone

Hope it helps.

Last edited by b0uncer; 05-17-2008 at 10:00 AM. Reason: typos, typos, typos..
 
Old 05-18-2008, 05:35 AM   #5
ramayana
LQ Newbie
 
Registered: May 2008
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks very much for all your help, i've deleted the lock file, but I still can't install Synaptic, letalone OOo. I give up ?temporarily and seek something more idiot-friendly.
 
Old 05-18-2008, 05:17 PM   #6
biophysics
Member
 
Registered: Jan 2002
Location: Germany
Distribution: Kubuntu
Posts: 444

Rep: Reputation: 30
If you are really that new, I would recommend you to start off with ubuntu or kubuntu. Try it for a few months - it is easier.
 
  


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
LXer: Simple Package management with Synaptic Package Manager LXer Syndicated Linux News 0 12-05-2006 06:33 PM
package management RzL Slackware 9 11-15-2006 06:10 PM
Using Package Archive style package management mugwump84 Linux From Scratch 3 08-25-2005 05:19 PM
package management laydros Slackware 6 01-21-2005 06:43 PM
Package Management Eklipz Slackware 4 12-05-2004 09:59 PM


All times are GMT -5. The time now is 12:07 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