2017-05-08 1 views
0

저는 Linux 용 셀레늄 용 소스에서 chromedriver를 빌드하려고합니다. 나는이 설명서를 사용합니다 https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md 그러나 오류없이 Google 크롬 코드 사이트를 다운로드 할 경우 2 메가 바이트 이하로 제작되었습니다. 이 크롬 드라이버는 셀레늄에서는 작동하지 않습니다. 그냥 빈 오류. 다른 사람에게 어떤 생각이 잘못 들었습니까? 고마워요리눅스 용 크롬 드라이버 빌드

답변

3

더 많은 정보가 필요합니다. 다음은 저를 위해 작동 한 dockerfile (주로 here에서 가져옴)입니다. 명령의 대부분은 크롬 build docs에서옵니다.

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/
관련 문제