On Wednesday 15 September 2010, David Kahn wrote:

> I am running production on Ubuntu 10.04 Server. I need whhtmltopdf to
> work without an X Server (as I have no gui there). The wkhtmltopdf
> static binary is said to have a patched QT that will allow this.
> However I have not been able to get the static binary to work. These
> are the results the steps I took to install:
> 
> Result: Once installed (see steps below), when I execute wkhtmltopdf
> in the terminal, it does not fire up... just returns me to the
> prompt - like it ran
[...]

> In /usr/bin:
> 
> 1) Confirmed that the existing (non-static) wkhtmltopdf resides there
> and that it executes. When I execute it with no args I get the
> help/about output from the app.

Don't install anything manually in /usr/bin. That directory belongs to 
your system (Ubuntu). Use /usr/local (or /usr/opt in special cases) for 
your own stuff.

> 2) Moved the existing wkhtmltopdf out of the directory (renamed it)

Don't. Just deinstall it.

> 3) Get the static binary: sudo curl -C - -O http: //
> wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-i386.tar.bz
> 2
> 
> 4) Untar: tar xvjf wkhtmltopdf-0.9.9-static-i386.tar.bz2

Sanitiy check: is the unpacked binary executable? What do you get if you 
start it with its complete path: /usr/local/bin/wkhtmltopdf-i386?

> 5) Rename: mv wkhtmltopdf-i386 wkthtmltopdf

Do this in /usr/local/bin and instead of renaming just add a symlink.

> 6) Get (apparently) necessary packages: sudo apt-get install openssl
> build-essential xorg libssl-dev

Do you get this impression from 
http://code.google.com/p/wkhtmltopdf/wiki/compilation ? That page 
describes how to *compile* the binary for yourself, something you don't 
need to do. You probably already have installed openssl, but you won't 
need the other packages. They don't hurt either (apart from taking up 
space).

Finally, do you get any output from

$ /usr/local/bin/wkhtmltopdf-i386

If you don't get anything, try

$ strace /usr/local/bin/wkhtmltopdf-i386

to get a trace of system calls the program is executing. You may need to 
install the strace package for that.

Michael

-- 
Michael Schuerig
mailto:[email protected]
http://www.schuerig.de/michael/

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to