1. chromedriver 下载地址:  https://npm.taobao.org/mirrors/chromedriver

在这里找到对应的驱动

2. 安装谷歌浏览器

2.1 安装依赖 

apt-get install libxss1 libappindicator1 libindicator7

2.2 下载Chrome安装包

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

2.3 安装

sudo dpkg -i google-chrome*.deb
sudo apt-get install -f

3. 安装chromedriver

找到和浏览器对应的驱动

3.1 安装依赖

apt-get install unzip

unzip chromedriver_linux64.zip

mv -f chromedriver /usr/local/share/chromedriver

3.2 安装

#建立软连接
ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver

4. 测试

from selenium import webdriver
from selenium.webdriver.chrome.options import Options options = Options()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(executable_path="/usr/local/bin/chromedriver",
chrome_options=options)
print("======")
driver.get('https://www.cnblogs.com/myvic/')
print(driver.title)
print('------------')
driver.quit()

参考资料:

https://www.cnblogs.com/x54256/p/8403864.html

https://blog.csdn.net/qq551551/article/details/78885704/

ubuntu 安装chrome 和chromedriver的更多相关文章

  1. python+ubuntu+selenium安装chrome和chromedriver

    请确保selenium已经安装成功,没安装的可以pip install selenium 安装chrome 在终端输入 下载安装包 wget https://dl.google.com/linux/d ...

  2. ubuntu安装chrome

    1.在Google chrome上面下载Chrome浏览器.选择正确的版本,我电脑是64位的所以选择的是[64 bit .deb (适用于 Debian/Ubuntu)]. google-Chrome ...

  3. 【Linux】【Selenium】安装Chrome和ChromeDriver的配置

    转自:https://www.cnblogs.com/longronglang/p/8078898.html 1.安装chrome sudo apt-get install libxss1 libap ...

  4. Ubuntu安装Chrome过程中的细节

    Ubuntu中的默认浏览器是Firefox,但是一直以来都认为Chrome更加优秀.下面记录一下在Ubuntu下安装Chrome的过程,也回顾一下Ubuntu系统中的一些细节. 大多数Linux安装软 ...

  5. centos 无界面 服务器 安装chrome部署chromedriver

    转:https://blog.csdn.net/u013849486/article/details/79466359 基本 做完了,要弄进docker里面去了的时候,才搜到 docker-chrom ...

  6. linux安装chrome及chromedriver(转)

    1.chrome: curl https://intoli.com/install-google-chrome.sh | bash 1.1.centos安装chrome: 從 Google 下載最新版 ...

  7. Ubuntu 安装Chrome

    apt方式安装Chrome 1.添加密匙 wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key a ...

  8. ubuntu安装chrome driver

    首先下载Chrome Driver(Firefox Driver的安装与该步骤相同) 链接: http://chromedriver.storage.googleapis.com/index.html ...

  9. Ubuntu 安装Chrome步骤

    一.添加PPA 从Google Linux Repository(http://www.google.com/linuxrepositories/)下载安装Key,或把下面的代码复制进终端,回车,需要 ...

随机推荐

  1. HDU.1796 How many integers can you find ( 组合数学 容斥原理 二进制枚举)

    HDU.1796 How many integers can you find ( 组合数学 容斥原理 二进制枚举) 题意分析 求在[1,n-1]中,m个整数的倍数共有多少个 与 UVA.10325 ...

  2. Java考试题之六

    QUESTION 134 Given:11. class Snoochy {12. Boochy booch;13. public Snoochy() { booch = new Boochy(thi ...

  3. Linux应用程序设计之网络基础编程

    1.TCP/IP协议概述 1.1.OSI参考模型及TCP/IP参考模型 OSI协议参考模型是基于国际标准化组织(ISO)的建议发展起来的,从上到下工分为7层:应用层,表示层,会话层,传输层,网络层,数 ...

  4. 视音频数据处理入门:RGB、YUV像素数据处理

    ===================================================== 视音频数据处理入门系列文章: 视音频数据处理入门:RGB.YUV像素数据处理 视音频数据处理 ...

  5. 如何给list清空

    1.list = new ArrayList<String>(): 2.list.clear(); 3.list=null;

  6. 数据结构编程实验——chapter10-应用经典二叉树编程

    二叉树不仅结构简单.节省内存,更重要是是这种结构有利于对数据的二分处理.之前我们提过,在二叉树的基础上能够派生很多经典的数据结构,也是下面我们将进行讨论的知识点: (1)   提高数据查找效率的二叉排 ...

  7. 浏览器内核控制meta name="renderer" 说明文档

    https://blog.csdn.net/adc_god/article/details/51531263

  8. soj1166. Computer Transformat(dp + 大数相加)

    1166. Computer Transformat Constraints Time Limit: 1 secs, Memory Limit: 32 MB Description A sequenc ...

  9. ArcGis10.1 Feature Class Properties无法编辑

    被这个问题困扰了很久,最后从官网帮助中查询到资料解决了 先看一下截图: 这种问题一般是FratureClass被锁,被mxd引用,并且发布服务有实例在运行,但我新创建一个FeatureClass也无法 ...

  10. [vmware]另类解决vmware关闭win10死机或蓝屏问题

    升级win10后在使用虚拟机发生一个问题,本人的win10版本为win10 9879, 在使用vmware时,当关机会整个系统死机,在网上搜索后发现这是由于win10内核升级导致vmware不兼容,最 ...