Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I am having debian 6 (64bit) on my laptop.
Its installed from cd-1 so it is having very few softwares installed within.
I am trying to install supertux and system monitor via terminal but it gives me output as follows
apt-get install supertux
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?
I am using it as root. pls help me. Also tell me if anything I need to do in sources.list file.
And also in future if I wanted to install any software then how can I get related things to paste in sources.list file?
This indicates the command was typed wrong: it should be
with a space between the command (ps) and the option (-A) whereas the error message reveal it was written as a single item (ps-A). Another way to check which process keep a file or a directory busy is by means of the lsof command. Try
sudo lsof /var/lib/dpkg
enter your user's password when prompted and post the results here, if in doubt.
An aside note: please use CODE tags when posting text copied/pasted from the terminal. They improve readability and preserve spacing. To use CODE tags either put [CODE] and [/CODE] around the text OR switch to Advanced Mode, select the text and click the # button. Thanks.
Basically you can't be using the dpkg files in another term while trying to use them elsewhere. As in running apt-get update while apt-get update is already running. Using lsof lets you know which application is currently using the file(s) in question. And fuser might help too. You run into similar issues with mount if you're cd'd into one of the directories of a mounted device and are trying to unmount it.
You can kill the application as a quick release of the file, or you can find what terminal is accessing it and play nice with that application.
kill -9 2345
(to send SIGTERM to the application, as above)
(to do basically the same thing, but multiple times if there happens to be more than one instance)
Basically kill requires the use of the pid of the application. And killall lets you use the applications name. If you can get to the term and application actually touching it directly that would probably work best. There are times when you don't want an application to fail by telling it to SIGTERM now. Or the power company does that for you by having an interruption in service. Since ending an update while performing the update can hose a few things. Particularly if libc is involved. I've had /var/lib/dpkg/available get corrupted once from a power failure. And that was no fun back in the early days. Especially if you're on dialup (or was at that time). Fortunately there was available.old at that time which I used to replace available and solved my issue.
BTW it might be nicer if you try to quit a program normally rather than just arbitrarily killing processes. Just lick the X on the titlebar. Never know what changes you may want to keep that will be lost by killing. Just my $0.02.
Don't use '-9' unless you jhave to; it kills it stone dead without giving it a chance to cleanup eg clear the lock/pid file.
Just try the kill cmd without -9, or (better if you have a GUI) use the GUI.