Installing chromedriver

Some time ago I needed to install chromedriver on a ubuntu machine. While this wasn’t too hard, I was nevertheless surprised by the number of open StackOverflow questions on this topic. So I decided to leave some notes for my future self.

First of all, let’s install chromedriver.

$ unzip
$ rm
$ sudo mv chromedriver /usr/local/bin

Let’s see what happens when we try and run it.

$ chromedriver

chromedriver: error while loading shared libraries:
cannot open shared object file: No such file or directory

That’s a bit unexpected. Luckily we can easily fix this.

$ sudo apt-get install libgconf-2-4

Now that we have a functioning chromedriver, the only thing left to do is to install Chrome. After all, chromedriver can’t function without Chrome.

$ wget -q -O - | sudo apt-key add -
$ sudo sh -c 'echo "deb stable main" >> /etc/apt/sources.list.d/google.list'
$ sudo apt-get update
$ sudo apt-get install google-chrome-stable

And that’s it. You should be good to go now.