wkhtmltopdf: No such file or directory [ Closed ]

倖福魔咒の 提交于 2021-02-09 09:16:20

问题


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

回答1:


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.




回答2:


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




回答3:


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



来源:https://stackoverflow.com/questions/45627142/wkhtmltopdf-no-such-file-or-directory-closed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!