首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为linux构建chromedriver

为linux构建chromedriver
EN

Stack Overflow用户
提问于 2017-05-08 14:48:50
回答 1查看 2.9K关注 0票数 0

我正在尝试从源代码构建chromedriver,以便在selenium for Linux中使用。我使用这个手册https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md,但是当我没有任何错误地构建我的chromedriver时,如果我从google code site下载,我的chromedriver要少2mb。并且这个chromedriver不能与selenium一起工作。只是空白错误。有没有人知道出了什么问题?谢谢

EN

回答 1

Stack Overflow用户

发布于 2017-07-08 03:38:51

我们需要更多的信息。这里有一个dockerfile (主要取自here),它适用于我。大多数命令都来自come build docs

代码语言:javascript
复制
FROM ubuntu:14.04

# Install Chromium build dependencies.
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty multiverse" >> /etc/apt/sources.list # && dpkg --add-architecture i386
RUN sudo apt-get update && apt-get install -qy git build-essential clang curl

# Install Chromium's depot_tools.
ENV DEPOT_TOOLS /usr/bin/depot_tools
RUN git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $DEPOT_TOOLS
ENV PATH $PATH:$DEPOT_TOOLS
RUN echo -e "\n# Add Chromium's depot_tools to the PATH." >> .bashrc
RUN echo "export PATH=\"\$PATH:$DEPOT_TOOLS\"" >> .bashrc

RUN git config --global https.postBuffer 1048576000

# Download Chromium sources.
RUN fetch --nohooks --no-history chromium

WORKDIR /

RUN gclient runhooks

WORKDIR src

RUN build/install-build-deps.sh --no-prompt

RUN gn gen out/Release --args="is_debug=false"
RUN ninja -C out/Release chromedriver

RUN cp out/Release/chromedriver /usr/bin/chromedriver

WORKDIR /
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43841415

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档