2 months ago
I can't install the weasyprint dependencies, according to the documentation, for Ubuntu you have to run "apt-get upgrade && apt install weasyprint -y" but it still doesn't work, adding NIXPACKS_PKGS to the environment variables didn't work either
OSError: cannot load library 'libgobject-2.0-0': libgobject-2.0-0: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libgobject-2.0-0'
1 Replies
2 months ago
WeasyPrint needs some system libs like libgobject-2.0-0 that aren't installed by default on Railway's Ubuntu images.
Make sure you set the environment variable NIXPACKS_PKGS to include these packages exactly like this (space separated , no quotes): libgobject-2.0-0 libcairo2 libpango-1.0-0 libgdk-pixbuf2.0-0 libffi-dev
Then rebuild your app on Railway and it should install those system dependencies.
In case that doesn't work, you should try to use/edit Dockerfile where you can install those libs yourself.
Status changed to Solved chandrika • 15 days ago