Forum How do I...?

Linux installation

johnfox
Here is the procedure I followed to install PrinceXML on my VPS (Linux). I am getting an error message that I can't figure out.

0. I downloaded the latest PrinceXML release (prince-6.0r6-linux.tar.gz) and uploaded this into my root directory.

1. Using PuTTY, I logged into my root.

2. I unzipped PrinceXML:
[~]# tar xzf prince-6.0r6-linux.tar.gz

3. Changed directories to where the files were untarred:
[~]# cd prince-6.0r6-linux

4. Installed PrinceXML
[~/prince-6.0r6-linux]# ./install.sh

5. This started the auto install. My system responded as follows:

Prince 6.0

Install directory
This is the directory in which Prince 6.0 will be installed.
Press Enter to accept the default directory or enter an alternative.
[/usr/local]:

6. Installed Prince into my home/root directory ("mplaybok" is the root)
[/usr/local]: /home/mplaybok/prince-6.0

Installing Prince 6.0...
Creating directories...
Installing files...

Installation complete.
Thank you for choosing Prince 6.0, we hope you find it useful.
Please visit http://www.princexml.com for updates and development news.

7. I then tried to issue this command to convert a file
prince acid2.html -o output.pdf

But no matter what I try (like changing the directory to /bin, etc.), I keep getting this error:

prince: command not found
mikeday
Try running:
/home/mplaybok/prince-6.0/bin/prince

or add the directory to your PATH, like this:
$ export PATH=$PATH:/home/mplaybok/prince-6.0/bin
$ prince
johnfox
Mike, I made some progress, but now have fontconfig errors. Here's the debug:

mplaybok@marketing-playbook.com [~]# prince --debug acid2.html
prince: debug: loading license: /home/mplaybok/prince-6.0/lib/prince/license/lic ense.dat
Fontconfig error: Cannot load default config file
prince: loading style sheet: /home/mplaybok/prince-6.0/lib/prince/style/fonts.cs s
prince: debug: loaded resource: /home/mplaybok/prince-6.0/lib/prince/style/fonts .css
prince: debug: loaded resource: type: no
prince: loading HTML input: acid2.html
prince: debug: loaded document: acid2.html
prince: debug: sniffed doctype: XHTML (no namespace)
prince: loading style sheet: /home/mplaybok/prince-6.0/lib/prince/style/xhtml.cs s
prince: debug: loaded resource: /home/mplaybok/prince-6.0/lib/prince/style/xhtml .css
prince: debug: loaded resource: type: no
prince: loading style sheet: /home/mplaybok/prince-6.0/lib/prince/style/common.c ss
prince: debug: loaded resource: /home/mplaybok/prince-6.0/lib/prince/style/commo n.css
prince: debug: loaded resource: type: no
prince: loading style sheet: /home/mplaybok/prince-6.0/lib/prince/style/hyph.css
prince: debug: loaded resource: /home/mplaybok/prince-6.0/lib/prince/style/hyph. css
prince: debug: loaded resource: type: no
prince: loading style sheet: /home/mplaybok/prince-6.0/lib/prince/style/xlink.cs s
prince: debug: loaded resource: /home/mplaybok/prince-6.0/lib/prince/style/xlink .css
prince: debug: loaded resource: type: no
prince: loading style sheet: /home/mplaybok/prince-6.0/lib/prince/style/mathml.c ss
prince: debug: loaded resource: /home/mplaybok/prince-6.0/lib/prince/style/mathm l.css
prince: debug: loaded resource: type: no
prince: loading style sheet: /home/mplaybok/prince-6.0/lib/prince/style/svg.css
prince: debug: loaded resource: /home/mplaybok/prince-6.0/lib/prince/style/svg.c ss
prince: debug: loaded resource: type: no
prince: loading style sheet: data URL
prince: debug: loaded resource: data URL
prince: debug: loaded resource: type: yes(resource_type("text/css", [], css, no) )
prince: debug: prepack
prince: loading image: data URL
prince: debug: loaded resource: data URL
prince: debug: loaded resource: type: yes(resource_type("image/png", [], image(p ng), no))
prince: loading image: data URL
prince: debug: loaded resource: data URL
prince: debug: loaded resource: type: yes(resource_type("application/x-unknown", [], unknown, no))
prince: data URL: warning: Unknown image MIME type: application/x-unknown
prince: loading image: http://www.webstandards.org/404/
prince: debug: error loading resource: The requested URL returned error: 404
prince: http://www.webstandards.org/404/: warning: The requested URL returned er ror: 404
prince: loading image: data URL
prince: debug: loaded resource: data URL
prince: debug: loaded resource: type: yes(resource_type("image/png", [], image(p ng), no))
prince: loading image: data URL
prince: debug: loaded resource: data URL
prince: debug: loaded resource: type: yes(resource_type("image/png", [], image(p ng), no))
prince: loading image: data URL
prince: debug: loaded resource: data URL
prince: debug: loaded resource: type: yes(resource_type("image/png", [], image(p ng), no))
prince: debug: ["sans-serif"] -> [font_record(font_desc("sans-serif", [], normal , [], []), [redirect("Arial"), redirect("Helvetica"), redirect("OpenSymbol"), re direct("DejaVu Sans")])]
prince: debug: ["Arial"] -> []
prince: debug: ["Helvetica"] -> []
prince: debug: ["OpenSymbol"] -> []
prince: debug: ["DejaVu Sans"] -> []
prince: internal error: no available fonts
mikeday
Check if you have fontconfig installed, if it's a server machine you may not. Check that you have some fonts installed, if you don't, try installing the msttcorefonts package or the DejaVu fonts. If you can't get fontconfig, edit fonts.css to link to the fonts directly using @font-face rules, as described here.