chromium-browser - 无法从命令行启动网站

chromium-browser - 无法从命令行启动网站

我有一个静态 html 站点,位于localhost.当我打开 Chromium 并手动输入localhost地址栏时,该网站会出现并正常运行。

但是,当我从终端输入以下内容时......

chromium-browser localhost

...Chromium 打开,localhost出现在地址栏中,但页面从未加载,我最终得到“你想等待吗?”

我正在运行树莓派

lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye

猫/过程/版本

Linux version 5.15.32-v8+ (dom@buildbot) (aarch64-linux-gnu-gcc-8 (Ubuntu/Linaro 8.4.0-3ubuntu1) 8.4.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #1538 SMP PREEMPT Thu Mar 31 19:40:39 BST 2022

如何从命令行启动该页面?

ETA:之后我尝试了以下网址chromium-browser

每个人都有相同的结果。

在终端窗口中出现以下错误消息(我正在使用我的 google-fu 来查看这些消息是否引导我找到解决方案):

libEGL warning: DRI2: failed to authenticate
[6181:6181:0420/125426.351921:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is egl, ANGLE is
[6181:6181:0420/125426.457777:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization
libEGL warning: DRI2: failed to authenticate
[6312:6312:0420/125429.016432:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is egl, ANGLE is
[6312:6312:0420/125429.154421:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization
[6358:6358:0420/125429.257975:ERROR:egl_util.cc(74)] Failed to load GLES library: /usr/lib/chromium-browser/libGLESv2.so: /usr/lib/chromium-browser/libGLESv2.so: cannot open shared object file: No such file or directory
[6358:6358:0420/125429.298887:ERROR:viz_main_impl.cc(188)] Exiting GPU process due to errors during initialization
[6367:6367:0420/125429.388139:ERROR:gpu_init.cc(454)] Passthrough is not supported, GL is disabled, ANGLE is
[6129:6186:0420/125436.969258:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[6129:6186:0420/125436.969526:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()

答案1

我找到了这个帖子:https://forums.raspberrypi.com/viewtopic.php?t=330711#p1990605

我盲目地尝试了它的建议,即执行以下操作:

echo 'export CHROMIUM_FLAGS="$CHROMIUM_FLAGS --use-gl=egl"' | sudo tee /etc/chromium.d/egl

(也就是说,它创建一个/etc/chromium.d/egl包含设置该 envar 的命令的文件)。

有效。有一天我什至可能会尝试理解其中的原因。

相关内容