redn0x redn0x - 7 months ago 80
Linux Question

I'm trying to install wkhtmltopdf on my VPS but get an errormessage when executing

I'm trying to install wkhtmltopdf on my virtual private server. This is a tool to convert HTML to PDF.

I did the following:

  1. Start SSH terminal and login.

  2. cd /var/www/vhosts/{domain}/subdomains/stage/httpdocs/lib/wkhtmltopdf

  3. wget

  4. tar -ixvf wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2

  5. ./wkhtmltopdf-i386 test.pdf

This is where I get my error:

./wkhtmltopdf-i386: error while loading shared libraries: cannot open shared object file: No such file or directory

Ok looking at this I'm thinking the libXrender has to be installed. So I tried to find the way to do that, but I'm not really linux expert. What I did find was this:

Before you install you will need to have X11, gcc and openssl
installed. On Debian/Ubuntu this can be done as follows:

sudo aptitude install openssl build-essential xorg libssl-dev libxrender-dev

And then I get this:

sudo: aptitude: command not found

I think the vps is running redhat enterprise I'm not sure about the edition. It also has Plesk 10.3 running. In my plesk panel it says the vps is running centOS but when I type help in SSH it says redhat

Answer Source

See if you have any file called libXrender in your /usr/lib directory. If you do, try creating a symbolic link with

ln -s libXrender-whatever

Try installing again your program.

If you don't have any libXrender file in /usr/lib, find the package by searching in google (you need to know your OS version)

uname -srv (will likely tell you your kernel version and distribution name)

Once you download the package, just run

rpm -Uvh [rpm-file-downloaded-for-libXrender]

Then try installing your program again.

If you use redhat, I believe you can simply do

yum install [any-package-name] and it will download the appropriate version for your distro, if it finds it by the name you provided.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download