Results 1 to 7 of 7
Hello, I've been messing around with Ubuntu for about a day, and the last few hours I've really been restricted with a weird issue, after googling around, I found a ...
- 10-07-2011 #1Just Joined!
- Join Date
- Oct 2011
- Posts
- 5
Help With apt-get Error and Cyborg RAT 5 Mouse (Something about Nano?)
Hello, I've been messing around with Ubuntu for about a day, and the last few hours I've really been restricted with a weird issue, after googling around, I found a few fixes, such as a few on another forum (Can't link because of lack of posts) and I tried them and they A) Didn't work for me or B) Couldn't complete them because of a different issue.
The error I've been getting whenever I try to use apt-get such asis:Code:sudo apt-get install gimp
It asks me if I am root, so I was thinking that it might require me to go into root, although I thought that was whatCode: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?
was for. So does anyone know a way to fix this that is likely to work and newbie friendly (Or just fairly detailed)?Code:sudo
I was also having another issue, one with my mouse, it's a Cyborg RAT 5. I found a blog post (Findable by Googling "Saitek Rat in Linux") that had a fix, and I had an issue with that. So what I did was
then I typedCode:sudo nano /etc/X11/Xmodmap
into the box thing (Nano?) and after that, I had no clue, the blog assumed the reader had the knowledge of what to do after that. I Googled it and found something about CTRL+O, tried that. (Is that supposed to save it?) and then it said to "You can then restart X or your computer and it should work without a problem." so I rebooted and I still have the issue of only being able to click once then I can move it around, click in Firefox, but any clicking outside of Firefox does nothing. Could someone clarify this nano thing for me?Code:pointer = 1 2 3 4 5 6 7 8 9 10 11 12 0 0 0
Edit: I am using Ubuntu 11.04Last edited by Vorsaykal; 10-07-2011 at 01:08 AM.
- 10-08-2011 #2
About E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
Most common cause for this error is probably that you have another program running that uses apt (taking over the lock file). As in having Synaptics running on X, or aptitude in another console. Close those programs and try the apt-get command again.
Nothing to say about nano or the Cyborg RAT 5 Mouse, except you don't have to use nano, use the text editor you like.
Regards
Luis
PS: And well yes, sudo is run this as another user or as root when you don't specify other user, but only if you have permission to (for graphic programs use gksu, as in "gksu gedit", check man gksu).
One may say, I think, that sudo is about allowing administrators to define what users/groups can and cannot run/do (also as who and on which computers). That may be set on the /etc/sudoers file (man sudoers and man visudo).
As an example, you'll have something like this on your /etc/sudoers file
%admin ALL=(ALL) ALL
and that's why you (as all members of group admin) can use sudo to act as root.
$ apt-cache show sudo
$ dpkg -L |grep sudoLast edited by ptkobe; 10-08-2011 at 02:46 AM.
- 10-08-2011 #3
For the first problem, you either have another package manager running, such as Synaptic, or the lock file wasn't properly deleted, probably the former.
For the second, to save a file in nano, press Ctrl-X to exit, then follow the prompts to save the file. Or use gedit.
- 10-08-2011 #4Just Joined!
- Join Date
- Oct 2011
- Posts
- 5
I've rebooted multiple times and closed every program I could, I also checked processes for stuff that looked related to apt, but it still gives me this error, I read somewhere that it happens when you interrupt a program that is in the middle of installing something.
And as for the nano thing, that's for the info, I'll try that soon.
- 10-08-2011 #5
Try delete the file, then.
$ sudo rm /var/lib/dpkg/lock
PS: Regarding text edit, you may use
$ gksu gedit <filename>
- 10-09-2011 #6
Do you happen to have your computer set to automatically check for updates?
If so, then even after a reboot, Synaptic could be running a sleeping process in the background.
Last time I had that issue was back in Fedora 10. Since then, I've had all auto-updates disabled.Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.
- 10-11-2011 #7
Maybe #555499 - Residual lock file after running aptitude - Debian Bug report logs may help
the problem is similar and it was "apt-get update as invoked by /etc/cron.daily/apt" (your case may be other)
I think the idea is that you may use
$ sudo fuser /var/lib/dpkg/lock
to find what PID(s) are using the file
Then
$ ps uax | grep <PID>
will list the process name.
Regards
Luis


Reply With Quote