Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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!
Post Reply
Message
Author
triscele
Posts: 10
Joined: 2009-12-07 13:58

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

#1 Post by triscele »

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

User avatar
Pick2
Posts: 790
Joined: 2007-07-07 13:31
Location: Decatur Il

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

#2 Post by Pick2 »

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.

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

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

#3 Post by triscele »

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.

User avatar
cnoyes
Posts: 114
Joined: 2009-12-06 18:13
Location: North Carolina
Contact:

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

#4 Post by cnoyes »

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
=================

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

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

#5 Post by triscele »

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.

User avatar
cnoyes
Posts: 114
Joined: 2009-12-06 18:13
Location: North Carolina
Contact:

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

#6 Post by cnoyes »

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
=================

Post Reply