Manual steps to install geckodriver on Ubuntu
Download the latest version of "geckodriver-vX.XX.X-linux64.tar.gz"
Unarchive the tarball (tar -xvzf geckodriver-vX.XX.X-linux64.tar.gz)
Give executable permissions to geckodriver (chmod +x geckodriver)
Move the geckodriver binary to /usr/local/bin or any location on your system PATH.
Script to install geckodriver on Ubuntu:
#!/bin/bashINSTALL_DIR="/usr/local/bin"json=$(curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest)url=$(echo "$json" | jq -r '.assets[].browser_download_url | select(contains("linux64"))')curl -s -L "$url" | tar -xzchmod +x geckodriversudo mv geckodriver "$INSTALL_DIR"echo "installed geckodriver binary in $INSTALL_DIR"
This answer was entirely copied from:Corey Goldberg's answer to How to install geckodriver in Ubuntu?