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
相关推荐
赵优秀一一1 天前
FastAPI 核心
linux·python·fastapi
相醉为友1 天前
024 嵌入式Linux应用开发——文字显示与freetype的使用显示
linux·运维·驱动开发
陳10301 天前
Linux:进程的基本理解
linux·计算机外设·进程
Hello World . .1 天前
Linux驱动编程1:imxull上移植Linux系统
linux·运维·服务器
小夏子_riotous1 天前
openstack的使用——5. Swift服务的基本使用
linux·运维·开发语言·分布式·云计算·openstack·swift
学Linux的语莫1 天前
Hyper-V的安装使用
linux·windows·ubuntu·hyper-v
IMPYLH1 天前
Linux 的 numfmt 命令
linux·运维·服务器·bash
proware1 天前
海思3403与3559安全启动
linux·安全·tee
领尚1 天前
openclaw 极简安装(Ubuntu 24.04 server)
linux·运维·ubuntu
迷途之人不知返1 天前
shell相关知识与Linux权限
linux