I don't know how to install a dependency, gobject-2.0-0
emmanueloz
HOBBYOP

2 years ago

Error when loading the shared library 'gobject-2.0-0': you cannot open the object file. Guidance on the correct installation on the Railroad is needed.

View Deploy details

ⓘ Deployment information is only viewable by Project members and Railway admins.

Solved

5 Replies

2 years ago

Sorry but there isn't enough information here for anyone to be of help, please add more information and context.


emmanueloz
HOBBYOP

2 years ago

I am using the WeasyPrint library with flask to make PDF reports, but when the application is deployed I have the dependency error ''gobject-2.0-0'', I already tried to install the dependencies but I don't know what else is necessary for it to work, continue without finding it, this is what and installed in the nixpacks file
[phases.setup]
nixPkgs = ["…"gobject-introspection"]
aptPkgs = ["…", "libgirepository1.0-dev","libcairo2-dev","python3-dev","python3-gi","python3-gi-cairo","gir1.2-gtk- 4.0","libpq-dev","gcc","python3-cffi","python3-brotli","libpango-1.0-0","libpangoft2-1.0-0","libjpeg-dev","libopenjp2- 7-dev","libffi-dev","libharfbuzz0b","libglib2.0-dev","gir1.2-gobject-2.0"]
and the error:
File "/opt/venv/lib/python3.10/site-packages/weasyprint/text/ffi.py", line 428, in
gobject = _dlopen(
File "/opt/venv/lib/python3.10/site-packages/weasyprint/text/ffi.py", line 417, in _dlopen
return ffi.dlopen(names[0]) # pragma: no cover
File "/opt/venv/lib/python3.10/site-packages/cffi/api.py", line 150, in dlopen
lib, function_cache = _makeffilibrary(self, name, flags)
File "/opt/venv/lib/python3.10/site-packages/cffi/api.py", line 832, in makeffi_library
backendlib = _loadbackendlib(backend, libname, flags)
File "/opt/venv/lib/python3.10/site-packages/cffi/api.py", line 827, in loadbackendlib raise OSError(msg) OSError: cannot load library 'gobject-2.0-0': gobject-2.0-0: cannot open shared object file: No such file or directory. Additionally, ctypes.util.findlibrary() did not manage to locate a library called 'gobject-2.0-0'


2 years ago

For this type of build you will want to use a Dockerfile.


Status changed to Solved Railway almost 2 years ago


emmanueloz
HOBBYOP

2 years ago

Thanks for the help, it's already working for me.


2 years ago

Awesome!


Loading...