Page 1 of 1

permission denied

Posted: Sat Mar 23, 2013 9:26 pm
by ags167
i have a problem nearly everything i try to du with my raspberry pi it always says:
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?

or nearly this.

any help? im seriously gonna getting pissed of because now i had my raspberry pi in a week and it always says that

please help

Re: permission denied

Posted: Sat Mar 23, 2013 9:52 pm
by joan
You need to elevate your privileges. Precede the command with sudo.

Re: permission denied

Posted: Sun Mar 24, 2013 11:43 pm
by jaylongley
once you are at a command prompt, just type in this:

sudo bash and press enter. it will allow you to run commands without having to type sudo before it each time

example: before you would have to type
sudo apt-get upgrade
to upgrade your packages

now all you have to type is
apt-get upgrade

saves you a little bit of time

Re: permission denied

Posted: Mon Mar 25, 2013 12:18 am
by tonyhughes
Commands requiring 'root' access (root is the user account that is allowed to do anything, kind of like Administrator accounts in Windows), need the command 'sudo' placed before your command.

E.g. if you log in as 'pi' (a normal, unprivileged account), and want to run:

apt-get update
apt-get upgrade
apt-get install htop

You actually need to type:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install htop

to perform these actions. You will be asked for your password to proceed.

This is a normal and everyday way for Linux systems to help prevent users from accidentally running commands that really need the concious approval of the system administrator.

i.e. it is designed to save your bacon.

Re: permission denied

Posted: Mon Jan 21, 2019 7:54 am
I used this command "/etc/modprobe.d/ipv6.conf" to enable the ipv6 .
but when i entered this command it throws me a error : bash: /etc/modprobe.d/ipv6.conf: permission denied .
can anyone help me out this problem...