我正在尝试使用终端更新谷歌,但每次我尝试使用时sudo apt-get install google-chrome-stable
,我都会收到以下消息:
E: Não foi possível obter trava /var/lib/dpkg/lock-frontend - open (11: Recurso temporariamente indisponível)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
我搜索了可以使用 锁定它的进程ps aux | grep -i apt
,但我不知道是否可以停止其中任何一个:
root 2459 0.0 0.0 4636 764 ? Ss 13:22 0:00 /bin/sh/usr/lib/apt/apt.systemd.daily update
root 2470 0.0 0.0 4636 1644 ? S 13:22 0:00 /bin/sh/usr/lib/apt/apt.systemd.daily lock_is_held update
suzana 11440 0.0 0.0 14444 1020 pts/0 S+ 13:35 0:00 grep -i apt
答案1
dpkg
并由服务apt
使用apt.systemd.daily
,您需要根据ps
命令的输出找到并杀死每个进程:
sudo kill -9 dpkg-process
sudo kill -9 apt-process
然后:
sudo dpkg --configure -a
sudo apt update
sudo apt install google-chrome-stable