Home > database >  I can't install mysql on ubunut 20.04
I can't install mysql on ubunut 20.04

Time:02-02

i have to install mysql-server for my project. but while i install with sudo apt install mysql-server it say's E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) and E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?. i'd try to search the solving method but is has no change. thanks for any help

(edit)

and also i get this error The following packages have unmet dependencies: mysql-server-core-8.0 : Depends: libprotobuf-lite23 (>= 3.12.4) but it is not installable

CodePudding user response:

The error indicates that another process is updating on your Linux machine.

You can check what processes are locking the file by running:

sudo lsof /var/lib/dpkg/lock-frontend

and kill the PID indicated by the command. If no processes are indicated by the command above, the easiest and fastest way to solve the issue is by rebooting your machine.

After the reboot rerun the command:

sudo apt install mysql-server

CodePudding user response:

Maybe you have some active apt process already?

check it: ps aux | grep -I apt

then sudo kill 'busy process id'

or you can kill all apt processes: sudo killall apt apt-get

and try install MySQL again

In other case you have a locked file, just check it:

sudo lsof /var/lib/dpkg/lock-frontend

then you try to remove lock

sudo rm /var/lib/dpkg/lock-frontend

and reconfigure dpkg

sudo dpkg --configure -a

sudo apt update

  •  Tags:  
  • Related