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

755
Visualizações
cannot load library libcairo

I have problem when trying to run a website in Django:

OSError: no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': /lib/x86_64-linux-gnu/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
cannot load library 'libcairo.so': /lib/x86_64-linux-gnu/libfontconfig.so.1: undefined symbol: FT_Done_MM_Var
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory

Althought the package is installed.

I have installed weasyprint

pip3 install weasyprint

python -m pip install WeasyPrint




  sudo apt-get install build-essential python3-dev python3-pip python3-setuptools python3-wheel python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info

I also tried

sudo apt install libcairo2-dev
sudo apt install libgirepository1.0-dev

I have Lubuntu system. Any ideas how can I fix it? Thanks in advance

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

0

The solution was to remove libfreetype.so.6 file from home/user/anaconda3/envs/myvenv/lib directory (idea taken from https://kb.tecplot.com/2019/09/11/undefined-symbol-ft_done_mm_var/)

over 4 years ago · Santiago Trujillo Relatório

0

For anyone coming here that is getting the error:

/lib/x86_84-linux-gnu/libcairo.so.2: undefined symbol: FT_Done_MM_Var

Run the command:

sudo find / -name *freetype*

As Uli Schlachter mentioned it's due to fonts being built in a newer version and used in an older version. I used alis01's comment to find out that for me:

/usr/lib/jvm/java-8-openjdk/jre/lib/amd64/libfreetype.so.6

was causing the issue. I renamed it to libfreetype.so.6.bak and all has been well since.

over 4 years ago · Santiago Trujillo Relatório

0

For Ubuntu 20 and Debian based distro, try:

sudo apt-get install libpangocairo-1.0-0
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