Skip to content

Instantly share code, notes, and snippets.

@Alex-Just
Last active February 29, 2020 15:13
Show Gist options
  • Save Alex-Just/4439e036ba5a155271bc03c1bf9b9ef2 to your computer and use it in GitHub Desktop.
Save Alex-Just/4439e036ba5a155271bc03c1bf9b9ef2 to your computer and use it in GitHub Desktop.
cd /tmp
export PKG_CONFIG_PATH=/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/lib
export PATH=/usr/bin:$PATH
export LDFLAGS=-L/usr/lib64:/usr/lib
export LD_LIBRARY_PATH=/usr/lib64:/usr/lib:/usr/local/lib/
export CPPFLAGS=-I/usr/include
sudo yum groupinstall "Development Tools" -y
sudo yum install pango-devel.x86_64 giflib-devel libjpeg-devel cairo-devel cairo-gobject-devel libXi-devel cups-libs dbus-glib libXrandr libXcursor libXinerama libXt.{i686,x86_64} -y
sudo rpm -ivh http://mirror.centos.org/centos/6/os/x86_64/Packages/atk-1.30.0-1.el6.x86_64.rpm # atk
sudo rpm -ivh http://mirror.centos.org/centos/6/os/x86_64/Packages/atk-devel-1.30.0-1.el6.x86_64.rpm # atk-devel
# Install firefox v66
wget https://download-installer.cdn.mozilla.net/pub/firefox/releases/66.0/linux-x86_64/en-US/firefox-66.0.tar.bz2 -P /tmp
sudo tar -jxvf /tmp/firefox-66.0.tar.bz2 -C /usr/local/
sudo ln -s /usr/local/firefox/firefox /usr/bin/firefox
sudo ln -s /usr/local/firefox/firefox-bin /usr/bin/firefox-bin
rm /tmp/firefox-66.0.tar.bz2
# Install geckodriver v0.26
wget https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz -P /tmp
sudo tar -xvzf /tmp/geckodriver* -C /usr/local/bin/
sudo chmod +x /usr/local/bin/geckodriver
rm /tmp/geckodriver-v0.26.0-linux64.tar.gz
# Install pixbuf from source (gtk dependency)
wget http://ftp.gnome.org/pub/GNOME/sources/gdk-pixbuf/2.28/gdk-pixbuf-2.28.2.tar.xz
tar xvfJ gdk-pixbuf-2.28.2.tar.xz
cd gdk-pixbuf-2.28.2
./configure --prefix=/usr --without-libtiff
make
sudo make install
cd /tmp
# Install gtk from source
wget http://ftp.gnome.org/pub/gnome/sources/gtk+/3.0/gtk+-3.0.0.tar.gz
tar xf gtk+-3.0.0.tar.gz
cd gtk+-3.0.0
./configure --without-libtiff --without-libjpeg
make
ln -s /usr/lib/* gtk/.libs/
sudo make install
cd /tmp
rm -rf /tmp/gdk* /tmp/gtk*
# Sanity check. Expected output: "*** You are running in headless mode. Mozilla Firefox 66.0"
MOZ_HEADLESS=1 firefox --version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment