I am trying to run sudo apt-get upgrade
but it is showing the below error message:
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (2: No such file or directory)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Here are the solutions I have tried :
- I have tried, "sudo apt-get update"
I have also tried to delete the locked files using the commands:
sudo rm -r /var/lib/dpkg/lock-frontend sudo rm -rf /var/lib/dpkg/lock
but it is showing the error that "no so such file or directory".
I tried to kill all the running process using the command:
ps aux | grep -i apt sudo kill -9 <process id> sudo killall apt apt-get
How can I solve this issue?
ls -l /vat/lib/dpkg/
? Looks like something is missing. – Kulfy May 09 '19 at 07:40ls -l /var/lib/dpkg/
. – Kulfy May 09 '19 at 07:50sudo mkdir -p /var/lib/dpkg/{alternatives,info,parts,triggers,updates}; sudo touch /var/lib/dpkg/status; sudo apt install dpkg
– Kulfy May 09 '19 at 08:56