Administrator
发布于 2024-01-13 / 417 阅读 / 0 评论 / 0 点赞

lxc ubuntu容器安装chromium 相关问题

lxc ubuntu容器安装chromium 相关问题

安装命令

sudo apt install squashfuse fuse snapd -y
sudo snap install chromium   

相关报错信息处理:

问题1:

Preparing to unpack chromium-browser_85.0.4183.83-0ubuntu0.20.04.3_arm64.deb ...
=> Installing the chromium snap
==> Checking connectivity with the snap store
==> Installing the chromium snap
error: system does not fully support snapd: cannot mount squashfs image using "squashfs": mount:
       /tmp/syscheck-mountpoint-117062718: mount failed: Operation not permitted.
dpkg: error processing archive chromium-browser_85.0.4183.83-0ubuntu0.20.04.3_arm64.deb (--install):
 new chromium-browser package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 chromium-browser_85.0.4183.83-0ubuntu0.20.04.3_arm64.deb

修改lxc配置文件common.conf

vi /data/lxc/share/lxc/config/common.conf

增加一下配置

features: fuse=1,mount=fuse,nesting=1
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file 0 0

问题2:

Preconfiguring packages ...
(Reading database ... 26483 files and directories currently installed.)
Preparing to unpack .../chromium-browser_1%3a85.0.4183.83-0ubuntu2.22.04.1_arm64.deb ...
=> Installing the chromium snap
==> Checking connectivity with the snap store
==> Installing the chromium snap
error: cannot perform the following tasks:
- Setup snap "chromium" (2725) security profiles (cannot setup udev for snap "chromium": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "chromium" (2725) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "cups" (1025) security profiles (cannot setup udev for snap "cups": cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "cups" (1025) security profiles (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "cups" (1025) security profiles for auto-connections (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory
)
- Setup snap "chromium" (2725) security profiles for auto-connections (cannot reload udev rules: exit status 1
udev output:
Failed to send reload request: No such file or directory

执行以下命令

/lib/systemd/systemd-udevd --daemon

问题3:

Preparing to unpack .../chromium-browser_1%3a85.0.4183.83-0ubuntu2.22.04.1_arm64.deb ...
=> Installing the chromium snap
==> Checking connectivity with the snap store
==> Installing the chromium snap
error: cannot perform the following tasks:
- Run configure hook of "chromium" snap if present (run hook "configure": cannot locate base snap core22: No such file or directory)
dpkg: error processing archive /var/cache/apt/archives/chromium-browser_1%3a85.0.4183.83-0ubuntu2.22.04.1_arm64.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.22.04.1_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

root@u22 ~
# sudo snap install chromium                                                                                                                                                                                                                  [15:28:37]
error: cannot perform the following tasks:
- Run configure hook of "chromium" snap if present (run hook "configure": cannot locate base snap core22: No such file or directory)

执行以下命令

sudo snap install core22 --beta 

sudo snap refresh core22 --edge  

sudo snap enable core22   

sudo snap install chromium   

安装成功提示:

chromium 120.0.6099.199 from Canonical✓ installed