Hi,
I successfully installed WeasyPrint.
Cairo is installed too.
I get this error when executing WeasyPrint:
Code:
Traceback (most recent call last):
File "./WeasyPrint/weasyprint.py", line 2, in <module>
from weasyprint.__main__ import main
File "/home/root/WeasyPrint/weasyprint/__init__.py", line 336, in <module>
from .css import PARSER, preprocess_stylesheet # noqa
File "/home/root/WeasyPrint/weasyprint/css/__init__.py", line 30, in <module>
from . import computed_values
File "/home/root/WeasyPrint/weasyprint/css/computed_values.py", line 18, in <module>
from .. import text
File "/home/root/WeasyPrint/weasyprint/text.py", line 18, in <module>
import cairocffi as cairo
File "/root/.local/lib64/python3.4/site-packages/cairocffi/__init__.py", line 46, in <module>
cairo = dlopen(ffi, 'cairo', 'cairo-2')
File "/root/.local/lib64/python3.4/site-packages/cairocffi/__init__.py", line 43, in dlopen
raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
OSError: dlopen() failed to load a library: cairo / cairo-2
It seems to be a common problem that no one really understands, I found plenty of topics on the net, but mostly for MacOS.
I tried to reinstall cairo libs, and the cairo and cairocffi of python, same thing.
My machine:
Slackware64, very customized, kernel grsec, no X.
I have another Slackware64 on a desktop, less minimal, and it works.
I can't figure out what makes the difference.
Any suggestions on what to try?
NOTE: I cannot reboot that server, but I mounted /usr in ramfs so I can experiment a bit without messing up the real /usr directory.
Thanks!