Rails: Error running wkhtmltopdf -- (error while loading shared libraries)
When my app runs (or when I run from commandline) the wkhtmltopdf command I get the following error: (showing it from command line)
#> wkhtmltopdf wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory
I noticed the lib is indeed in the
/usr/lib folder but not the
/lib folder. Does it matter which one of these it is in? Is there any way to get it to recognize it?
#> ls -l /usr/lib/libXrender.so* lrwxrwxrwx 1 root root 19 Feb 17 07:20 /usr/lib/libXrender.so -> libXrender.so.1.3.0 lrwxrwxrwx 1 root root 19 Feb 17 07:20 /usr/lib/libXrender.so.1 -> libXrender.so.1.3.0 -rwxr-xr-x 1 root root 39184 Jan 29 2010 /usr/lib/libXrender.so.1.3.0 #> ls -l /lib/libXrender.so* ls: cannot access /lib/libXrender.so*: No such file or directory
I also checked dependencies of the lib
# ldd /usr/lib/libXrender.so.1 libX11.so.6 => /usr/lib/libX11.so.6 (0x00002b9cb5afd000) libc.so.6 => /lib/libc.so.6 (0x00002b9cb5e04000) libXau.so.6 => /usr/lib/libXau.so.6 (0x00002b9cb6143000) libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00002b9cb6347000) libdl.so.2 => /lib/libdl.so.2 (0x00002b9cb654d000) /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)
This is running on an EngineYard gentoo server
The Unix packages x11-libs/libXext and x11-libs/libXrender are dependencies
sudo emerge libXext libXrender
PDFkit wiki also explains in more detail how to get wkhtmltopdf working on engine yard. PDFkit wiki
Debian or Ubuntu:
sudo apt-get install libxrender1
Hope this helps
Rails: Error running wkhtmltopdf -- (error while loading shared , PDFkit wiki also explains in more detail how to get wkhtmltopdf working on that this file is statically linked even though the payload requires shared libraries. The issue seemed to be related to Heroku's use of containers and my cut and paste efforts moving symlinks not actual files (go figure). I would thank the minion at Arch who gave me the pointer I needed, but it included comments alluding to my greatly diminished mental capacity and surprise that I could even install Arch, let alone develop on it.
I had the same, issue on Debian Squeeze, amd64. Installing libxrender1 solved the issue for me.
sudo apt-get install libxrender1
Issue #37 � rposborne/wkhtmltopdf-heroku, Rails: Error running wkhtmltopdf -- (error while loading shared libraries). 发布于 2020-04-23 16:28:49. When my app runs (or when I run from commandline) the� Previous Post Where is Jenkins pipeline state stored and how can I retain its state when running Jenkins in a Docker container?
I need also do after:
sudo apt-get install libfontconfig1
wkhtmltopdf 12.5.0, Error LibXrender1 on Heroku-18 mileszs/wicked_pdf#742 You can confirm by running heroku buildpacks in the project root. /wkhtmltopdf-linux-amd64: error while loading shared libraries: libpng12.so.0: cannot try heroku buildpacks:add --index 1 heroku-community/apt and add libpng12 to Aptfile? Dismiss Join GitHub today. GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Ran into this today on a RHEL7 machine running the static version of wkhtmltopdf. Solution was to install a few dependencies:
yum install libXrender libXext fontconfig
error while loading shared libraries: libjpeg.so.8: cannot open shared object file: No such file or directory If you need to run this on heroku, please use There are currently some issues with wkhtmltopdf 0.12.5 on Ubuntu� To add a bit of insight, I found out today that the underlying gem, wkhtmltopdf is what handles the pulling in of images from s3. Using rails on heroku, we were able to simply switch over gem 'wkhtmltopdf-binary, which is just out of date and uses the old (now deprecated as of June 8) SSLv3 module.
If your system is 64 bits, and your software requires 32 bits libs, you need to add the flag "i386",
for example on ubuntu:
sudo apt-get install libxrender1:i386
Error running wkhtmltopdf -- (error while loading shared libraries). Ben; 2011-02- 17 22:39; 9. When my app runs (or when I run from commandline) the wkhtmltopdf while loading shared libraries) � ruby-on-rails pdf-generation wkhtmltopdf. I'm also running into this issue, but removing "if path.nil?" didn't work for me. The linked stackoverflow posts also didn't work. I'm not using the wkhtmltopdf-binary gem.
And the solution that worked was this handy command, which gets needed X11 fonts: sudo yum install xorg-x11-fonts-100dpi.noarch xorg-x11-fonts-75dpi.noarch xorg-x11-fonts-ISO8859-1-100dpi.noarch xorg-x11-fonts-ISO8859-1-75dpi.noarch xorg-x11-fonts-ISO8859-14-100dpi.noarch xorg-x11-fonts-ISO8859-14-75dpi.noarch xorg-x11-fonts-ISO8859-15-100dpi.noarch xorg-x11-fonts-ISO8859-15-75dpi.noarch xorg
wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line tools to render HTML into PDF and various image formats using the Qt WebKit rendering engine. These run entirely "headless" and do not require a display or display service.
It seems to be successful as much as I understand (a pod named nvidia-driver-installer-tckv4 was added to the pods list in the node, and it’s running without errors) Next I created the deployment:
- It does help to know that others are having this issue ... mine works on 32bit instances but fails on this one 64bit machine and it seems they have the same issue.
- Hi Ben, I have just edited my answer to include a link to PDFkit wiki, which might help
- That post had instructions, but I noticed it was referencing the i386 version so I changed to referencing the amd64 and it worked ... so I updated the wiki to include instructions for 64bit instance.
- Updated wiki link @ZX12R
- This worked for me! However, on Debian I also had to run
sudo apt-get install libext6.
- This was very helpful! Addition to libxrender1, libfontconfig1 was needed. Therefore this answers the question.
- This was very helpful, indeed
- Thank you for this, I would have been looking forever
- Thanks, the accepted answer is incomplete without your answer.
- After doing this on mine it showed Black boxes instead of text. I had to install these two packages to make the text work: