centos7安装google chrome和chromium

一、下载安装包

复制代码
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

创建一个文件夹,把安装包放到文件夹内

复制代码
mkdir ./google_chrome
mv google-chrome-stable_current_x86_64.rpm ./google_chrome/  

二、安装

注意千万不要使用 rpm去安装,否则会报错很多字体、so等依赖,使用yum install 安装会自动下载这些依赖安装:

复制代码
cd  ./google_chrome    # 进入目录
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm

三、修改 --no-sandbox

浏览器图表位置:applications --- internet 中可以看的图标,可以把图标拖放到桌面

但是发现,在root账户下双击图标是不能直接运行的,可以在命令行输入:google-chrome --no-sandbox 运行

或者修改图标属性后也可以双击运行:

鼠标右键图标属性,把"/usr/bin/google-chrome-stable %U" 改成" /usr/bin/google-chrome-stable --no-sandbox %U "

四、安装 chromium

python 的 pyppeteer 运行时会自动安装 chromium 但是在centos7系统中 自动安装后检测版本号:chromium-browser --version 显示仍未安装,因此进行手动安装:

复制代码
yum install chromium -y
相关推荐
不怕犯错,就怕不做2 小时前
RK3562的CPU如何降频及关闭硬件编解码
linux·驱动开发·嵌入式硬件
CoderMeijun3 小时前
Linux 文件操作详解:open/read/write/lseek 系统调用
linux·文件操作·系统调用·open·文件描述符
可可西里_X_back3 小时前
Linux学习(二)- 驱动开发步骤
linux·驱动开发·学习
Hical_W3 小时前
Hical 踩坑实录五部曲(二):MSVC / GCC / Clang 三平台 C++20 编译差异
linux·windows·经验分享·嵌入式硬件·macos·开源·c++20
活蹦乱跳酸菜鱼4 小时前
linux ATF BL2执行过程
linux
淡淡烟雨淡淡愁5 小时前
安装libreoffice
linux
蜀道山老天师5 小时前
云原生监控入门:监控基础概念 + SLI/SLO/SLA 详解 + Prometheus 从零安装配置
linux·运维·云原生·prometheus
AIDF20266 小时前
linux 服务器网络问题排查
linux·服务器·网络
楼兰公子6 小时前
br_opi5_plus_defconfig 附带uboot
linux·运维·服务器
mzhan0176 小时前
Linux: signal: SIGALRM; alarm: ITIMER_REAL
linux·运维·服务器