Google Chrome 无法在 Ubuntu 22.04 LTS 中打开

Google Chrome 无法在 Ubuntu 22.04 LTS 中打开

我在一台 Ryzen 5 CPU 的机器上全新安装了 Ubuntu 22.04,我从https://www.google.co.uk/chrome/选择 64 位.deb包,安装正常,没有出现任何错误。

但是运行 Chrome 时它不会显示任何内容,并且会出现错误:

kevin@home:~$ google-chrome libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)

[23127:23127:0422/093510.765043:ERROR:sandbox_linux.cc(377)] InitializeSandbox() called with multiple threads in process gpu-process.

我试过了rm -rf ~/.config/google-chrome,我也试过了google-chrome --disable-gpu --no-sandbox,但都没有用。

这是 Chrome 版本:

kevin@home:~$ google-chrome --version
Google Chrome 100.0.4896.127 

这就是出路sudo google-chrome --disable-gpu --no-sandbox

kevin@home:~$ sudo google-chrome --disable-gpu --no-sandbox
[sudo] password for kevin: 
[29946:29973:0422/095302.474445:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[29946:29973:0422/095302.474504:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[29981:29981:0422/095302.480831:ERROR:angle_platform_impl.cc(44)] DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
[29981:29981:0422/095302.480902:ERROR:angle_platform_impl.cc(44)] Display.cpp:966 (initialize): ANGLE Display::initialize error 12289: Not initialized.
[29981:29981:0422/095302.480949:ERROR:gl_surface_egl.cc(808)] EGL Driver message (Critical) eglInitialize: Not initialized.
[29981:29981:0422/095302.480973:ERROR:gl_surface_egl.cc(1430)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[29981:29981:0422/095302.481006:ERROR:gl_ozone_egl.cc(20)] GLSurfaceEGL::InitializeOneOff failed.
[29981:29981:0422/095302.481880:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization
[29946:29973:0422/095302.483125:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[29946:29973:0422/095302.483146:ERROR:bus.cc(397)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[30017:30017:0422/095302.509279:ERROR:angle_platform_impl.cc(44)] DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
[30017:30017:0422/095302.509350:ERROR:angle_platform_impl.cc(44)] Display.cpp:966 (initialize): ANGLE Display::initialize error 12289: Not initialized.
[30017:30017:0422/095302.509401:ERROR:gl_surface_egl.cc(808)] EGL Driver message (Critical) eglInitialize: Not initialized.
[30017:30017:0422/095302.509432:ERROR:gl_surface_egl.cc(1430)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[30017:30017:0422/095302.509467:ERROR:gl_ozone_egl.cc(20)] GLSurfaceEGL::InitializeOneOff failed.
[30017:30017:0422/095302.510423:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[30043:30043:0422/095302.523272:ERROR:angle_platform_impl.cc(44)] DisplayVkXcb.cpp:59 (initialize): xcb_connect() failed, error 1
[30043:30043:0422/095302.523368:ERROR:angle_platform_impl.cc(44)] Display.cpp:966 (initialize): ANGLE Display::initialize error 12289: Not initialized.
[30043:30043:0422/095302.523423:ERROR:gl_surface_egl.cc(808)] EGL Driver message (Critical) eglInitialize: Not initialized.
[30043:30043:0422/095302.523468:ERROR:gl_surface_egl.cc(1430)] eglInitialize SwANGLE failed with error EGL_NOT_INITIALIZED
[30043:30043:0422/095302.523512:ERROR:gl_ozone_egl.cc(20)] GLSurfaceEGL::InitializeOneOff failed.
[30043:30043:0422/095302.524597:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization
Authorization required, but no authorization protocol specified
Authorization required, but no authorization protocol specified
[30094:30094:0422/095302.533872:ERROR:gpu_init.cc(446)] Passthrough is not supported, GL is disabled, ANGLE is 
[30094:30107:0422/095302.535111:ERROR:x11_software_bitmap_presenter.cc(141)] XGetWindowAttributes failed for window 10485763

我继续运行root,但它挂起了一个小(且空的)“欢迎使用 Google Chrome”框和许多错误,有什么想法吗?

答案1

google-chrome libva error在 Intel 上为 Ubuntu 22.04 LTS 下载 Chrome 和 Opera(基于 Chromium)时也遇到了同样的情况。

通过在完成下载(进入reboot终端)后重新启动来解决两个浏览器的问题。

不过,我建议关闭计算机然后再打开,这感觉有点愚蠢。

答案2

我找到了这篇文章:https://notes.enovision.net/linux/google-chrome-not-starting-in-ubuntu并且它有帮助。

基本上,我所做的是:

sudo vim /usr/share/applications/google-chrome.desktop

改变:

Exec=/usr/bin/google-chrome-stable %U

到:

Exec=/usr/bin/google-chrome-stable --password-store=basic %U

删除本地配置文件似乎也有帮助:

rm ~/.config/google-chrome/ -rf

答案3

总体问题相同,但就我而言,这是文件权限障碍:

$ sudo apt install wget
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wget is already the newest version (1.21.2-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
--2023-03-26 14:35:18--  https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Resolving dl.google.com (dl.google.com)... 172.253.116.91, 172.253.116.93, 172.253.116.190, ...
Connecting to dl.google.com (dl.google.com)|172.253.116.91|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 93863468 (90M) [application/x-debian-package]
Saving to: ‘google-chrome-stable_current_amd64.deb’

google-chrome-stabl 100%[===================>]  89.51M  4.97MB/s    in 19s     

2023-03-26 14:35:38 (4.66 MB/s) - ‘google-chrome-stable_current_amd64.deb’ saved [93863468/93863468]

$ sudo dpkg -i google-chrome-stable_current_amd64.deb
Selecting previously unselected package google-chrome-stable.
(Reading database ... 338595 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (111.0.5563.110-1) ...
Setting up google-chrome-stable (111.0.5563.110-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for mailcap (3.70+nmu1ubuntu1) ...
Processing triggers for gnome-menus (3.36.0-1ubuntu3) ...
Processing triggers for desktop-file-utils (0.26-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.6+22.04.20220217-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for menu (2.1.47ubuntu4) ...
$ google-chrome
/usr/bin/google-chrome: line 8: /usr/bin/readlink: Permission denied
/usr/bin/google-chrome: line 10: /usr/bin/dirname: Permission denied
/usr/bin/google-chrome: line 24: /usr/bin/mkdir: Permission denied

3 个文件夹:

/usr/bin/readlink /usr/bin/目录名 /usr/bin/mkdir

所有用户均可读取和执行,但只有 root 可写入。

/usr/bin/google-chrome 中是否有代码试图改变这 3 个目录中的代码?

真的很奇怪为什么 Chrome 似乎总是无法与 Ubuntu 兼容……

我想我们应该接受这个错误的暗示。

让我们都坚持使用 Chromium。

答案4

我在新机器上遇到了同样的问题:

ubuntu 22.04.02 lts chrome 版本 113.0.5672.63(官方版本)(64 位)AMD Ryzen 9 6900HX,带有 Radeon Graphics。

google-chrome-stable 启动后只显示空白页,无法打开任何内容。

错误:

libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[17085:17085:0508/101428.353088:ERROR:service_worker_task_queue.cc(234)] DidStartWorkerFail lhobafahddgcelffkeicbaginigeejlf: 14

使用 --no-sandbox 选项确实有效,但感觉不安全。

还有其他想法吗?:) 谢谢。

相关内容