How do you fix open lock file when you don't show in sudoers

New to Debian (Or Linux in general)? Ask your questions here!

How do you fix open lock file when you don't show in sudoers

Postby triscele » 2009-12-07 14:05

I apologize beforehand for what may be be a noob question. I was trying to setup a LAMP server and it said to run apt-get update to get new versions of all of the packages. When I try that, it gives me a
Could not open lock file /var/lib/apt/lists/lock.... then Unable to lock the list directory.

It was recommended on various posts to use sudo. When I tried that I get a message saying that I am not in the sudoers list. To my knowledge I only have one login so I am at a loss to know where to go next. I have the Linux Bible but so far can't seem to find anything there.

On the positive side, I can browse to the machine :D

Another question I have, in anticipation I could get this up, I downloaded several files expecting them to be in the downloads folder and I don't see them anywhere, any ideas?

Thanks for your help,

Ignorance is not a good time

Kevin
triscele
 
Posts: 10
Joined: 2009-12-07 13:58

Re: How do you fix open lock file when you don't show in sudoers

Postby Pick2 » 2009-12-07 14:16

sudo is not set up in debian. Normally we use su , followed by root's password , which will drop you into the root user's account. Then use exit to return to your normal user. If you su into root , it might solve all your problems.
sudo is not hard to set up , it works well for multi user setups , but is not really needed if you are the only user and admin of the box.
User avatar
Pick2
 
Posts: 797
Joined: 2007-07-07 13:31
Location: Decatur Il

Re: How do you fix open lock file when you don't show in sudoers

Postby triscele » 2009-12-07 14:58

thrilled with the quick response. It did get me somewhere new. Unfortunately it now says Unknown id: apt-get. I will check after an appointment to see if I can find that online somewhere. Thanks again for your assistance.
triscele
 
Posts: 10
Joined: 2009-12-07 13:58

Re: How do you fix open lock file when you don't show in sudoers

Postby cnoyes » 2009-12-07 23:48

you typed "su apt-get" so your shell thought you were trying to pass to the command SU, the id of apt-get. Instead, type su on it's own line, and then wait for it to prompt for password. Type in the root password(first account you setup during install) and then type 'apt-get update' once su has completed.
=================
chris@suxbox.org
Debian Sid
=================
User avatar
cnoyes
 
Posts: 114
Joined: 2009-12-06 18:13
Location: North Carolina

Re: How do you fix open lock file when you don't show in sudoers

Postby triscele » 2009-12-08 06:11

That seems to have done the trick. I'm at least making some progress now. Thanks for spending the time to help out. It is appreciated.
triscele
 
Posts: 10
Joined: 2009-12-07 13:58

Re: How do you fix open lock file when you don't show in sudoers

Postby cnoyes » 2009-12-25 16:29

Glad to hear you're making progress, Debian is a great distro for a LAMP server. sudo is a convention not really used in Debian, more commonly in Debian derivatives. If you feel more comfortable using sudo however, you can add your user to the sudoers file(/etc/sudoers) to do this type(as root):

Code: Select all
visudo


look for a line that reads 'root ALL=(ALL) ALL'
underneath it, you want to make an identical entry, but replace root with your normal username. When you're done adding the line type ctrl x to exit, and when prompted type y to save it. Now you're a sudoer.

Hope this helps.
=================
chris@suxbox.org
Debian Sid
=================
User avatar
cnoyes
 
Posts: 114
Joined: 2009-12-06 18:13
Location: North Carolina


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable