Skip to content

Instantly share code, notes, and snippets.

@mikesmullin
Created May 8, 2012 16:08
Show Gist options
  • Save mikesmullin/2636776 to your computer and use it in GitHub Desktop.
Save mikesmullin/2636776 to your computer and use it in GitHub Desktop.
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/;
@lucasea777
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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
Copy link
Author

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

@bhargava-kush
Copy link

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
Copy link

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
Copy link

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

@Shubham-design472
Copy link

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