10

I am using a headless ubuntu, and want to install latest geckodriver. So I must install by entering a command line. my ubuntu is 14.04 trusty.

But, I don't know the command to install geckodriver. https://github.com/mozilla/geckodriver/

and here are many versions of geckodriver. https://github.com/mozilla/geckodriver/releases I guess I have to download linux32.tar.gz one.

Do I have to include the url of github to write a installing command line?

heyzude
  • 363
  • 1
  • 4
  • 20

3 Answers3

12

Step1 : Download Gecko Driver

wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz

Step2: Unzip tar file

sudo tar -xvf geckodriver-v0.26.0-linux64.tar.gz

Step3: Move Gecko Driver to Binary Location

sudo mv geckodriver /usr/local/bin/

Step4: Change Current Directory to Binary Location

cd /usr/local/bin/

Step5: Make Executable Permission to 'geckodriver'

sudo chmod +x geckodriver

Gecko Driver Setup Successfull

Ali
  • 1,357
  • 2
  • 12
  • 18
Littin Rajan
  • 852
  • 1
  • 10
  • 21
10

You can install geckodriver by a single command in Ubuntu:

sudo apt-get install firefox-geckodriver

Other distributions may need another approach.

Philippe Delteil
  • 937
  • 13
  • 30
Vishal Sinha
  • 121
  • 1
  • 8
  • 2
    I tried every other solution (I even compiled the driver) but wasn't able to install it on raspberry-pi. This worked like a charm! – Bat Feb 23 '22 at 23:39
  • 2
    error : Unable to locate package firefox-geckodriver . debian 11 – hn_tired Jul 24 '22 at 10:58
9

Run these the commands:

wget https://github.com/mozilla/geckodriver/releases/download/v0.18.0/geckodriver-v0.18.0-linux64.tar.gz

(You can find the download URL to the latest release of geckodriver on Github.)

Extract the file with

tar -xvzf geckodriver*

Make it executable (note this shouldn't be necessary, unless the unzipped file doesn't have the execute bits set):

chmod +x geckodriver

Add the driver to your PATH in ~/.bashrc so other tools can find it:

export PATH=$PATH:/path-to-extracted-file/geckodrive
imrek
  • 2,930
  • 3
  • 20
  • 36
TheSilentKnight
  • 126
  • 1
  • 8