Hello Friends,
I need help.
After inputting all the pre-installation info via ssh, and the installation is about to proceed (Installation will take about 15 minutes...)
I got this error message on Putty
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Error: apt-get upgrade failed
So the installation stopped.
I'm using a dedicated server. Prior the installation of myvestacp (my top choice among open source panels), I ran a sudo upgrade and update command of Debian 10. Everything was fine until I got the error above.
Thank you for any help. And thank you to the kind founder of myvestacp for your work on this fork.
dpkg frontend lock
- myVesta
- Site Admin
- Posts: 928
- Joined: Fri Jun 19, 2020 9:59 am
- Has thanked: 8 times
- Been thanked: 6 times
You obviously have some 'apt' proccess that get locked in background.
Try to unlock it by following this: https://itsfoss.com/could-not-get-lock-error/
----------------------------------
In short:
In your ssh, as root, run:
You will see output like this:
In this example we see process 8134
Now we will kill that process:
And re-run upgrade process by doing:
The above command would continue upgrading process in most cases.
But, if you are still locked, then:
Run these commands one by one:
It’s possible that the commands don’t return anything, or return just one number. If they do return at least one number, use the number(s) and kill the processes like this (replace the <process_id> with the numbers you got from the above commands):
You can now safely remove the lock files using the commands below:
After that, re-run upgrade process again:
The above command would continue upgrading process
--------------------------
p.s. Check if you are running 'apt' as root?
Try to unlock it by following this: https://itsfoss.com/could-not-get-lock-error/
----------------------------------
In short:
In your ssh, as root, run:
Code: Select all
ps aux | grep -i apt
Code: Select all
root 8134 0.1 0.7 70252 58800 pts/0 S+ 20:25 0:03 apt upgrade
Now we will kill that process:
Code: Select all
sudo kill 8134
sudo kill -9 8134
Code: Select all
sudo dpkg --configure -a
But, if you are still locked, then:
Run these commands one by one:
Code: Select all
sudo lsof /var/lib/dpkg/lock
sudo lsof /var/lib/apt/lists/lock
sudo lsof /var/cache/apt/archives/lock
Code: Select all
sudo kill -9 <process_id>
Code: Select all
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
Code: Select all
sudo dpkg --configure -a
--------------------------
p.s. Check if you are running 'apt' as root?
-
- Posts: 8
- Joined: Mon Dec 14, 2020 8:59 am
I wish to publicly thank Sir Dpeca, the founder of myVestacp, for his kindness and for his time in helping me fixed this issue. All the websites that provide solutions to the above error were not enough to fix the problem.
Dpeca suggested this solution before executing the installation script:
Dpeca suggested this solution before executing the installation script:
Code: Select all
sudo bash
cd ~