我正在尝试从源代码构建 chromedriver 以在 Linux 的 selenium 中使用。
我用这个手册https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md但是当我构建没有任何错误时,我的 chromedriver 会比从 google code 网站下载的少 2mb。而且这个 chromedriver 不适用于硒。只是空白错误。
有人知道出了什么问题吗?谢谢
我们需要更多信息...这是一个 dockerfile(主要取自here)这对我有用。大部分命令来自 chromium构建文档.
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 /
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)