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

 

 

 

Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
lquenon
Posts: 2
Joined: 2018-04-14 14:23

Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#1 Post by lquenon »

Bonjour à tous,

Bien qu'informaticien expérimenté je suis nouveau dans le monde linux.
J'ai un soucis avec la commande sudo, j'ai suivi les procédures d'install et de config de sudo (Adduser, sudoers, etc...)
Et pourtant même après reboot quand j'essaie d'utiliser apt-get update && apt-get upgrade nano, je reçois le message suivant

Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock - open (13: Permission non accordée)
E: Impossible de verrouiller le répertoire d'administration (/var/lib/dpkg/). Avez-vous les privilèges du superutilisateur ?

Quelqu'un pourrait-il m'aider je suis un peu perdu?
D'avance merci.

Laurent

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#2 Post by 4D696B65 »

Hello everyone,

Although experienced computer scientist I am new to the linux world.
I have a problem with the sudo command, I followed the sudo install and config procedures (Adduser, sudoers, etc ...)
And yet even after reboot when I try to use apt-get update && apt-get nano upgrade, I get the following message

Unable to open lock file / var / lib / dpkg / lock - open (13: Permission not granted)
E: Can not lock the administration directory (/ var / lib / dpkg /). Do you have superuser privileges?

Can someone help me I'm a little lost?
Thanks in advance.

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#3 Post by 4D696B65 »

Please post the exact commands you used.

lquenon
Posts: 2
Joined: 2018-04-14 14:23

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#4 Post by lquenon »

I tried to use "sudo apt-get update && apt-get upgrade nano".

Thanks for your help.

Laurent.

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#5 Post by 4D696B65 »

I don't us sudo so I may be wrong

Code: Select all

sudo apt-get update && sudo apt-get upgrade nano

arzgi
Posts: 1193
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 31 times

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#6 Post by arzgi »

lquenon wrote:I tried to use "sudo apt-get update && apt-get upgrade nano".
First you have to install sudo:

Code: Select all

apt install sudo 
(requires root privileges).

And I'm not sure, what you are trying to do.

Code: Select all

sudo apt update && sudo apt upgrade
are used to update system. If you want install nano, command is

Code: Select all

sudo apt install nano

nasdeb
Posts: 5
Joined: 2018-04-16 21:28

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#7 Post by nasdeb »

as tu ajouté ton utilisateur au fichier sudo ?
si non, lance la commande

Code: Select all

 visudo 
( en utilisateur root )

et en dessous de la ligne "root ALL=(ALL:ALL) ALL" ajoute "(le nom de ton utilisateur) ALL=(ALL:ALL) ALL"

en espérant que cela puisse t'aider :)

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#8 Post by debiman »

4D696B65 wrote:

Code: Select all

sudo apt-get update && sudo apt-get upgrade nano
this.
though i wonder, wouldn't it be wiser to upgrade the whole system?

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 86 times

Re: Impossible d'ouvrir le fichier verrou /var/lib/dpkg/lock

#9 Post by 4D696B65 »

debiman wrote:
4D696B65 wrote:

Code: Select all

sudo apt-get update && sudo apt-get upgrade nano
this.
though i wonder, wouldn't it be wiser to upgrade the whole system?
yes but that's not want the op wanted. :mrgreen:

Post Reply