dlopen() failed to load a library: cairo / cairo-2

后端 未结 6 1098
走了就别回头了
走了就别回头了 2020-12-18 18:43

This is my view:

from django.conf import settings
from django.http import HttpResponse
from django.template.loader import render_to_string
import weasyprint
         


        
6条回答
  •  渐次进展
    2020-12-18 19:08

    This was solved for me by installing the following dependencies on Ubuntu:

     sudo apt-get install libpango1.0-0
     sudo apt-get install libcairo2
     sudo apt-get install libpq-dev
    

    Check out the dependencies at the link:

    http://weasyprint.readthedocs.io/en/latest/install.html

提交回复
热议问题