Skip to content

Instantly share code, notes, and snippets.

@calebbrewer
Last active April 20, 2023 23:28
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save calebbrewer/aca424fb14618df8aadd to your computer and use it in GitHub Desktop.
Save calebbrewer/aca424fb14618df8aadd to your computer and use it in GitHub Desktop.
How to Setup wkhtmltopdf on CentOS 7
@Sylvain-Bugat
Copy link

To automatically install all the needed dependencies of wkhtmltopdf it's better to use the default yum package manager like that: yum localinstall <package>.rpm , example:
yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm

@Ranacse10
Copy link

LocalInstall may not fill up all dependencies

@jlockman2
Copy link

I was able to install successfully using the below:

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

rpm -Uvh wkhtmltox-0.12.6-1.centos7.x86_64.rpm

@ajitsingh25
Copy link

The below commands fixed the issue for me

Make sure to remove below two packages first for the clean installations
yum remove -y wkhtmltopdf
yum remove -y wkhtmltox

And then execute below two commands
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.centos7.x86_64.rpm
yum localinstall wkhtmltox-0.12.6-1.centos7.x86_64.rpm

Verify
wkhtmltopdf --version

@JuanCarlosAguilarB
Copy link

thanks!

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