在 ubuntu 20.10 上安装 chromium 时出错

在 ubuntu 20.10 上安装 chromium 时出错
    sudo apt-get install chromium-browser

[sudo] password for leo: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  chromium-browser
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/48.4 kB of archives.
After this operation, 164 kB of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 184344 files and directories currently installed.)
Preparing to unpack .../chromium-browser_1%3a85.0.4183.83-0ubuntu2_amd64.deb ...
=> Installing the chromium snap
==> Checking connectivity with the snap store
==> Installing the chromium snap
error: cannot perform the following tasks:
- Download snap "chromium" (1466) from channel "stable" (unexpected EOF)
- Download snap "gnome-3-28-1804" (145) from channel "stable" (unexpected EOF)
dpkg: error processing archive /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu2_amd64.deb (--unpack):
 new chromium-browser package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该怎么办?

答案1

尝试通过 flatpack 安装 Chromium:

sudo apt install flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

完成此步骤后,可能需要重新启动系统

flatpak install flathub org.chromium.Chromium
flatpak run org.chromium.Chromium

另外,这是关于 ppa 和 snap 之间的差异的问题的答案:

Snap 旨在升级 PPA,而 PPA 本身旨在升级将随机存储库添加到 sources.list。PPA 不易被发现,可能会对系统的其余部分产生不利影响;Snap 经过沙盒处理并列在默认包管理器中,改善了这些方面。与传统包相比,沙盒处理还带来了一些其他问题,例如启动时间慢以及需要设置访问沙盒和退出沙盒的权限。

相关内容