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
相关推荐
orion579 小时前
Missing Semester Class1:course overview and introduction of shell
linux
用户1204872216115 小时前
Linux驱动编译与加载
linux·嵌入式
用户8055336980321 小时前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户8055336980321 小时前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
七歌杜金房1 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
tntxia2 天前
linux curl命令详解_curl详解
linux
扛枪的书生3 天前
Linux 网络管理器用法速查
linux
顺风尿一寸3 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode3 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫3 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux