谷歌浏览器安装--Dependency issue installing google-chrome-stable through Ubuntu docker

发布时间 2023-03-31 16:41:18作者: sgggr

1.ubuntu安装谷歌浏览器找不到安装包libu2f-udev,记录一下解决办法

Creating a dummy package which provides libu2f-udev fixes the issue. I followed below steps for Ubuntu 16.04. Install equivs package

sudo apt install equivs
equivs-control libu2f-udev

2.This creates a file libu2f-udev. Edit this file and give libu2f-udev as value of "Package" and "Provides" keys. Then execute

equivs-build libu2f-udev

3.This creates dummy package libu2f-udev_1.0_all.deb. Install it by

sudo dpkg -i libu2f-udev_1.0_all.deb

1.吸取的教训,以后看报错,而不是直接在浏览器搜索
2.stackoverflow上找答案比专业靠谱一些

ERROR:zygote_host_。。。。。Running as root without --no-sandbox is not supported.

安装好google后,在命令行输入google-chrome后出现,ERROR:zygote_host_impl_linux.cc(89)] Running as root without --no-sandbox is not supported.错误。

解决方法:

命令行输入:

google-chrome --no-sandbox

然后重启系统。

在命令行输入:

vim /usr/bin/google-chrome
按i键,进入插入模式,下拉到最后一行,

将 exec -a "\(0" "\)HERE/chrome" "$@" 改为

exec -a "\(0" "\)HERE/chrome" "$@" --user-data-dir --no-sandbox

设置ok后,在命令行输入google-chrome,就可以正常打开了