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/releasesI guess I have to download linux32.tar.gz one.

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

3

Best Answer


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

You can install geckodriver by a single command in Ubuntu:

sudo apt-get install firefox-geckodriver

Other distributions may need another approach.

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