咕萌小站

「世界に忘れられた」

解决 CairoSVG 报错问题

因为我的咕小酱需要用到 CairoSVG 这个库来生成PNG图片,但是当我调用这个库时候就出大问题了,于是记录下解决方法。

报错现象

OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory
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

这是因为运行环境不完整,用以下命令就可以解决了

命令

sudo apt install libffi-dev
sudo apt install libcairo2

关于Ubuntu时区设置

上一篇
评论
发表评论 说点什么
还没有评论
    78