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
相关推荐
笨笨饿15 分钟前
32_复变函数在工程中实际应用区别于联系
linux·服务器·c语言·人工智能·单片机·算法·学习方法
Bert.Cai17 分钟前
Linux pwd命令详解
linux·运维
Wasim40424 分钟前
【Linux】网络命令
linux·网络安全·linux网络命令·linux网络安全入门
BUG_MeDe42 分钟前
从Json对象中提取某个对象的一点注意--libjson-c
linux·json
坚持就完事了1 小时前
Linux的which命令
linux·运维·服务器
skywalk81631 小时前
kitto_plus报错:AttributeError: module ‘kotti_plus‘ has no attribute ‘security‘
linux·开发语言·python
和小潘一起学AI1 小时前
centOS安装neo4j
linux·运维·服务器
HealthScience1 小时前
H20服务器多卡运行有错误gpu_partition ,tmux错误
linux·运维·服务器
_Emma_1 小时前
【Raspberry PI】Raspberry Pi HEVC (H.265) 硬件解码器
linux·驱动开发·视频编解码
RisunJan1 小时前
Linux命令-netstat(查看Linux中网络系统状态信息)
linux·运维·服务器