wkhtmltopdf: No such file or directory [ Closed ]
Asked Answered
A

3

5

I installed wkhtmltopdf from the following code

sudo apt-get install wkhtmltopdf

But when I am creating PDF then it is generating following error

Error: /bin/bash: /usr/bin/wkhtmltopdf: No such file or directory
Anabatic answered 11/8, 2017 at 4:46 Comment(0)
J
8

I think the correct path would be /usr/local/bin/wkhtmltopdf. You can get it by which wkhtmltopdf command.

Jews answered 11/8, 2017 at 5:51 Comment(1)
Thanks! next I added a symlink ln -s /usr/local/bin/wkhtmltopdf /usr/bin/wkhtmltopdfPuff
T
3

It appears that when you're trying to run wkhtmltopdf, it's not finding the program to execute.

You can try to locate it with locate wkhtmltopdf. That should return the path to the executable. If that doesn't return a path, you can use this (but it will take longer): find / -name wkhtmltopdf 2>/dev/null.

Once you've got the path of the executable, make sure to add it to your $PATH, so it can be called from anywhere on the command line. See this post for instructions on how to add to the path variable.

Tontine answered 11/8, 2017 at 5:14 Comment(1)
Right now it showing following error: Error: /bin/bash: wkhtmltopdf: command not foundAnabatic
A
2

After a long time facing this issue I decided to replace it by another converter.

I removed wkhtmltopdf and I installed html-pdf converter and then PDF file created successfullu

Anabatic answered 29/8, 2017 at 6:42 Comment(2)
I am just about to do this as well, wkhtmltopdf is pissing me off, been fighting with it for daysSinner
I am face same problem but not wkhtmltopdf its wkhtmltoimageHadleigh

© 2022 - 2024 — McMap. All rights reserved.