问题描述
执行下列代码的时候报错如下
apt-get update && apt-get -f install
报错信息:
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?
解决方法
1.先提权
sudo -s
2.重新执行代码
apt-get update && apt-get -f install
执行结果
可以看到已经正常执行了