Skip to content

Instantly share code, notes, and snippets.

@paulsturgess
Last active October 26, 2022 01:04
Show Gist options
  • Star 42 You must be signed in to star a gist
  • Fork 12 You must be signed in to fork a gist
  • Save paulsturgess/cfe1a59c7c03f1504c879d45787699f5 to your computer and use it in GitHub Desktop.
Save paulsturgess/cfe1a59c7c03f1504c879d45787699f5 to your computer and use it in GitHub Desktop.
yum install -y libpng
yum install -y libjpeg
yum install -y openssl
yum install -y icu
yum install -y libX11
yum install -y libXext
yum install -y libXrender
yum install -y xorg-x11-fonts-Type1
yum install -y xorg-x11-fonts-75dpi
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-centos7-amd64.rpm
rpm -Uvh wkhtmltox-0.12.2_linux-centos7-amd64.rpm
---- or ----
wget http://download.gna.org/wkhtmltopdf/0.12/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
unxz wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar -xvf wkhtmltox-0.12.4_linux-generic-amd64.tar
mv wkhtmltox/bin/* /usr/local/bin/
rm -rf wkhtmltox
rm -f wkhtmltox-0.12.4_linux-generic-amd64.tar
@smash-wp
Copy link

Thank you very much!

@sagrawal31
Copy link

Awesome. The 2nd option worked for headless server.

@ishenkoyv
Copy link

Maybe update this gist with https://downloads.wkhtmltopdf.org/ as download.gna.org have been closed

@adamasantares
Copy link

@paulsturgess please update URL of rpm...

@amkac
Copy link

amkac commented Oct 31, 2017

The 2nd option worked for me. Thank you

@AndreasFurster
Copy link

@Buy-Now-Depot
Copy link

Buy-Now-Depot commented Jan 15, 2018

I thought the directions were flawless except instead of the package noted I used https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz instead
The download.gna.org seem to get stuck on connection from root

@saruman
Copy link

saruman commented Apr 26, 2018

Thank you so much for this.
The second option worked for me.

@zellkz
Copy link

zellkz commented Sep 25, 2018

Updated links to RPM located on official website:
https://wkhtmltopdf.org/downloads.html

@harinathebc
Copy link

Thank you...second option is working for me but the url is updated to wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

@tuckbloor
Copy link

Thank you...second option is working for me but the url is updated to wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

thanks

@Franogales
Copy link

Im going to update this link because appears to be down
wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm

@parambirsingh
Copy link

@siddiqlm
Copy link

siddiqlm commented Jan 9, 2020

wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm

I was keep getting "Unable to establish SSL connection". Then I ran the command with -d (wget -d URL) and found that the page throwing 301 error. So, I hit the URL in the browser and using network tab I found that it is redirecting to https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm this URL.

So the following command works fine

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm

@RAUH-D
Copy link

RAUH-D commented May 15, 2020

Nothing seems to work for me. I always get: 404 Not Found

@MauroCasula
Copy link

For the second option, use:

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

Thanks @paulsturgess! Maybe you can update your repo with this new url?

@axis-mikeepascual
Copy link

axis-mikeepascual commented Jun 3, 2021

First option worked for me! (CentOS)
Do the yum install first! followed by this one below.
-> sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm
lastly, this one.
-> sudo rpm -Uvh wkhtmltox-0.12.5-1.centos7.x86_64.rpm

*you can check your /usr/local/bin the wkhtmltopdf is there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment