在Ubuntu 20.04上,Chromium不能启动

分享于 

3分钟阅读

ubuntu

  繁體

问题:

我在运行Ubuntu 20.04 x86_64,并使用snap安装了chromium


$ snap list 


Name Version Rev Tracking Publisher Notes


chromium 84.0.4147.89 1229 latest/stable canonical✓ -


core18 20200707 1880 latest/stable canonical✓ base


gtk-common-themes 0.1-36-gc75f853 1506 latest/stable canonical✓ -


snapd 2.45.2 8542 latest/stable canonical✓ snapd



但是chromium无法启动,如果我启动它,它会中止执行,在/var/log/syslog/var/log/kern.log中,将生成以下行:


kernel: [ 1590.847960] traps: chrome[5324] trap int3 ip:557cd4d7b152 sp:7fffde23a9c0 error:0 in chrome[557cd1a59000+7234000]



另外,在/var/log/apport.log中,对于每次执行尝试,此行将出现:


ERROR: apport (pid 5556) Thu Jul 16 10:32:47 2020: host pid 5324 crashed in a separate mount namespace, ignoring



当从终端启动时,得到:


$ chromium-browser --disable-extensions


[11036:11036:0716/152514.953429:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.


WARNING: Kernel has no file descriptor comparison support: Operation not permitted


Trace/breakpoint trap (core dumped)



使用chromium --disable-extensions,消息相同。


$ chromium-browser --disable-gpu --disable-software-rasterizer


MESA-LOADER: failed to retrieve device information


MESA-LOADER: failed to open i915 (search paths /snap/chromium/1229/usr/lib/x86_64-linux-gnu/dri)


failed to load driver: i915


MESA-LOADER: failed to open kms_swrast (search paths /snap/chromium/1229/usr/lib/x86_64-linux-gnu/dri)


failed to load driver: kms_swrast


MESA-LOADER: failed to open swrast (search paths /snap/chromium/1229/usr/lib/x86_64-linux-gnu/dri)


failed to load swrast driver


Trace/breakpoint trap (core dumped)



chromium --disable-gpu --disable-software-rasterizer 我使用CPU集成图形卡,CPU是Intel Core i=4670.

我还试着运行 chromium-browser --disable-gpu --disable-software-rasterizer 之后 export MESA_GLSL_CACHE_DISABLE=true 但是,错误消息与上面的相同。


答案1:

事实证明,可能与Chromium Snap中未加载字体的问题有关。

我找到了以下解决方法:


# first close all instances of chromium


sudo rm /var/cache/fontconfig/*


rm ~/.cache/fontconfig/*


sudo fc-cache -r -v


rm -rf ~/snap/chromium/common/.cache/fontconfig/


chromium-browser





STA  CHR  Ubuntu  SNA  snap  Chromium