使用 ubuntu 20.04.6 LTS 版本 vikas@vikas-X542UQ:~$ apt --fix-broken install E: 无法打开锁文件 /var/lib/dpkg/lock-frontend

使用 ubuntu 20.04.6 LTS 版本 vikas@vikas-X542UQ:~$ apt --fix-broken install E: 无法打开锁文件 /var/lib/dpkg/lock-frontend

我已经使用 sudo -s 进行更新,但仍然面临未满足依赖包的问题

面临的问题

sudo apt-get update

尝试过

sudo -s
apt-get update
apt-get upgrade

然后面临问题

The following packages have unmet dependencies:
The following packages have unmet dependencies:
 libreoffice-base : Depends: libreoffice-common (>= 1:6.4.0~beta1-2~) but it is not installed
 libreoffice-core : Depends: libreoffice-common (> 1:6.4.7) but it is not installed
 libreoffice-java-common : Depends: libreoffice-common but it is not installed
 libreoffice-script-provider-bsh : Depends: libreoffice-common but it is not installed
 libreoffice-script-provider-js : Depends: libreoffice-common but it is not installed
 libreoffice-script-provider-python : Depends: libreoffice-common but it is not installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

答案1

按照计算机的建议,运行sudo apt update后跟sudo apt --fix-broken install。如果显示Could not open lockfile,则重新启动并重试。

相关内容