Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
easily install chromedriver on linux/osx
sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.googlecode.com/files/chromedriver_linux64_19.0.1068.0.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
@mikesmullin

This comment has been minimized.

Copy link
Owner Author

@mikesmullin mikesmullin commented May 8, 2012

curl -L http://goo.gl/OP8Y2 | bash
@tommeier

This comment has been minimized.

Copy link

@tommeier tommeier commented Jul 15, 2014

sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;
@gingebot

This comment has been minimized.

Copy link

@gingebot gingebot commented Oct 22, 2014

sudo apt-get install unzip;
wget -O /tmp/chromedriver.zip http://chromedriver.storage.googleapis.com/2.11/chromedriver_linux64.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;

@Creativekalyan

This comment has been minimized.

Copy link

@Creativekalyan Creativekalyan commented Feb 26, 2015

We have installed Successfully

sudo apt-get install unzip
wget -N http://chromedriver.storage.googleapis.com/2.10/chromedriver_linux64.zip -P ~/Downloads
unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
chmod +x ~/Downloads/chromedriver
sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver
Change the directory to /usr/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
Now run the script and add the following in the environment file.

Capybara.register_driver :chrome do |app| client = Selenium::WebDriver::Remote::Http::Default.new Capybara::Selenium::Driver.new(app, :browser => :chrome, :http_client => client) end

Capybara.javascript_driver = :chrome

Note : Change the chrome driver version according to your operating system type like 32 bit or 64 bit.

Happy Testing!

@lucasea777

This comment has been minimized.

Copy link

@lucasea777 lucasea777 commented Dec 28, 2015

I think this should install the latest release:

sudo apt-get install unzip &&
a=$(uname -m) &&
rm -r /tmp/chromedriver/
mkdir /tmp/chromedriver/ &&
wget -O /tmp/chromedriver/LATEST_RELEASE http://chromedriver.storage.googleapis.com/LATEST_RELEASE &&
if [ $a == i686 ]; then b=32; elif [ $a == x86_64 ]; then b=64; fi &&
latest=$(cat /tmp/chromedriver/LATEST_RELEASE) &&
wget -O /tmp/chromedriver/chromedriver.zip 'http://chromedriver.storage.googleapis.com/'$latest'/chromedriver_linux'$b'.zip' &&
sudo unzip /tmp/chromedriver/chromedriver.zip chromedriver -d /usr/local/bin/ &&
echo 'success?'
@FelikZ

This comment has been minimized.

Copy link

@FelikZ FelikZ commented Apr 5, 2016

chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

apt-get install libnss3 libgconf-2-4
@iamdalaba

This comment has been minimized.

Copy link

@iamdalaba iamdalaba commented Oct 30, 2017

wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;

@rubentd

This comment has been minimized.

Copy link

@rubentd rubentd commented Feb 27, 2018

wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;

@kw-at-oocl

This comment has been minimized.

Copy link

@kw-at-oocl kw-at-oocl commented May 5, 2018

Latest version as of writing is 2.38. Don't be fooled by comment above - 2.9 is a very old version.

wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/2.38/chromedriver_linux64.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;

@kekbait

This comment has been minimized.

Copy link

@kekbait kekbait commented Jun 2, 2018

I updated this script to make it automatically download the latest version :
LATEST_VERSION=$(curl -s https://chromedriver.storage.googleapis.com/LATEST_RELEASE) && wget -O /tmp/chromedriver.zip https://chromedriver.storage.googleapis.com/$LATEST_VERSION/chromedriver_linux64.zip && sudo unzip /tmp/chromedriver.zip chromedriver -d /usr/local/bin/;

@mikesmullin

This comment has been minimized.

Copy link
Owner Author

@mikesmullin mikesmullin commented Jul 15, 2018

Its so funny which gists become popular. Nice job ppl 👍

@bhargava-kush

This comment has been minimized.

Copy link

@bhargava-kush bhargava-kush commented Feb 28, 2019

chromedriver: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory
chromedriver: error while loading shared libraries: libgconf-2.so.4: cannot open shared object file: No such file or directory

apt-get install libnss3 libgconf-2-4

Thanks

@nbarsch

This comment has been minimized.

Copy link

@nbarsch nbarsch commented Jul 31, 2019

I think this should install the latest release:

sudo apt-get install unzip &&
a=$(uname -m) &&
rm -r /tmp/chromedriver/
mkdir /tmp/chromedriver/ &&
wget -O /tmp/chromedriver/LATEST_RELEASE http://chromedriver.storage.googleapis.com/LATEST_RELEASE &&
if [ $a == i686 ]; then b=32; elif [ $a == x86_64 ]; then b=64; fi &&
latest=$(cat /tmp/chromedriver/LATEST_RELEASE) &&
wget -O /tmp/chromedriver/chromedriver.zip 'http://chromedriver.storage.googleapis.com/'$latest'/chromedriver_linux'$b'.zip' &&
sudo unzip /tmp/chromedriver/chromedriver.zip chromedriver -d /usr/local/bin/ &&
echo 'success?'

This is great code. Thanks @lucasea777

@Anthonymcqueen21

This comment has been minimized.

Copy link

@Anthonymcqueen21 Anthonymcqueen21 commented Oct 4, 2020

I dont understand i currently run Parrot OS and all i get is errors.

@Shubham-design472

This comment has been minimized.

Copy link

@Shubham-design472 Shubham-design472 commented May 10, 2021

selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally
(Driver info: chromedriver=2.10.267518,platform=Linux 4.4.0-19041-Microsoft x86_64)

How to solve this problem??
Please someone tell me.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment