Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi,
i am a new user in linux.I just tried to install g++ in my laptop from command prompt.i Use this code
qvantel@qvantel-laptop:~$ sudo apt-get install g++
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?
qvantel@qvantel-laptop:~$
and got the above error.Please tell me what to do.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
'sudo apt-get install g++' will do.
But you will have to wait until the "Automatic check for updates"
has finished. And of course close all 'GUI package install' tools,
as said by @johnsfine.
Or use 'Synaptic' or 'Ubuntu Software center' for the install.
thanks for your replay.But i think i got the problem.Actually previously i installed sunjava through apt-get install
sun java6.0.Which is installed successfully and i am able to use it.but at end of the installation it is opening a gui prompt of java.As i am doing from command prompt i am not able to close it.So even if i am closing the terminal the process still exit.So,next time when i am doing any apt-get install g++ it is not allowing.I clean up the apt-get lock but after that whenever i trying to install anything through apt-get it is upgrading the java file again and stopping at same point. Is there any way i can solve it.if not i think i need to uninstall the java application and then try to install g++.
Hopefully someone else can give you better details than what I recall. But in case waiting for a better answer is slow:
I have seen this problem using Synaptic, which doesn't look exactly the same but is the same underlying issue.
Installing Sun Java from the package manager is not self contained. During the install it tells you to get some additional file directly from Sun (I guess Oracle now). After you get that file, you can make the install complete. Until you have done that, every other install operation re reports the problem.
With Synaptic, I have had no trouble skipping over the problem, so other packages (G++ etc.) can be installed while the Java install is still unfinished. Also I have no trouble closing the failure in Synaptic leaving it unsolved (but not leaving it locked). Apparently closing it unsolved by not locked was not obvious using apt-get instead of Synaptic.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.