![删除 opera 浏览器后,出现 E: 执行脚本 DPkg 时出现问题](https://linux22.com/image/949570/%E5%88%A0%E9%99%A4%20opera%20%E6%B5%8F%E8%A7%88%E5%99%A8%E5%90%8E%EF%BC%8C%E5%87%BA%E7%8E%B0%20E%3A%20%E6%89%A7%E8%A1%8C%E8%84%9A%E6%9C%AC%20DPkg%20%E6%97%B6%E5%87%BA%E7%8E%B0%E9%97%AE%E9%A2%98.png)
我使用命令删除了 Opera 浏览器
sudo dpkg -r opera-stable
sudo rm -f /etc/apt/sources.list.d/opera-stable.list
升级时我现在收到的错误是:
E: Problem executing scripts DPkg::Pre-Invoke 'stat -c %Z $(readlink -f $(which opera)) > /tmp/opera.timestamp'
E: Sub-process returned an error code
我尝试了清理 apt、更新、使用 -y 升级以及人们建议的所有其他方法。
我在使用 Lubuntu 20.04。
我删除了软件源中的所有存储库,但问题仍然存在。
apt purge opera-stable
给出:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
chromium-codecs-ffmpeg-extra pepperflashplugin-nonfree
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
opera-stable*
0 upgraded, 0 newly installed, 1 to remove and 42 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
readlink: missing operand
Try 'readlink --help' for more information.
stat: missing operand
Try 'stat --help' for more information.
E: Problem executing scripts DPkg::Pre-Invoke 'stat -c %Z $(readlink -f $(which opera)) > /tmp/opera.timestamp'
E: Sub-process returned an error code
答案1
通过使用 snap 安装 opera 解决了这个问题。然后我删除了/etc/apt/sources.list
它,并用从https://gist.githubusercontent.com/ishad0w/788555191c7037e249a439542c53e170/raw/3822ba49241e6fd851ca1c1cbcc4d7e87382f484/sources.list