Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.7K
Visualizações
gobject-2.0-0 not able to load on macbook

I am facing this error when I start my flask python3 application on mac.

OSError: cannot load library 'gobject-2.0-0': dlopen(gobject-2.0-0, 2): image not found. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'

I am using weasyprint in my project which is causing this issue.

I tried to install glib and it is installed in my system

over 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

I just managed the same issue on my Mac M1.

The problem was that symlinks to the libraries were not created (can't say should it be done by homebrew or weasyprint when installation).

So, I had to do it manually

sudo ln -s /opt/homebrew/opt/glib/lib/libgobject-2.0.0.dylib /usr/local/lib/gobject-2.0
sudo ln -s /opt/homebrew/opt/pango/lib/libpango-1.0.dylib /usr/local/lib/pango-1.0
sudo ln -s /opt/homebrew/opt/harfbuzz/lib/libharfbuzz.dylib /usr/local/lib/harfbuzz
sudo ln -s /opt/homebrew/opt/fontconfig/lib/libfontconfig.1.dylib /usr/local/lib/fontconfig-1
sudo ln -s /opt/homebrew/opt/pango/lib/libpangoft2-1.0.dylib /usr/local/lib/pangoft2-1.0

This solved the problem.

In order to TEST if Python can find the library you may run

from ctypes.util import find_library

find_library('gobject-2.0')  # Pass any other lib name as an argument
over 4 years ago · Santiago Trujillo Relatório

0

If you installed weasyprint package in your virtual env but did not installed some required packages for that, then that might be the reason. It was actually, in my case.

If you're mac user you need install pango and libffi, not to mention python as well.

Installation guide on mac

brew install python pango libffi
(venv) pip install weasyprint
over 4 years ago · Santiago Trujillo Relatório

0

I had the same issue after the homebrew update. Turned out the issue was because of the older pango lib version.

I did brew install pango

This upgraded pango lib from 1.48.2 -> 1.50.4 which internally installed gobject's latest version as dep. And my issue got resolved.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda