ERROR
No package ‘pangocairo’ found
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [31 lines of output]
Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found
看报错信息, 是pangocairo
的问题, 手动下载编译安装
从官网下载pango-1.51.0.
解压后进入文件夹内
可知是使用meson
和ninjia
构建的.
首先下载
pip3 install meson ninja
构建的一般过程如下:
# 通过--prefix指定install路径, 不然默认装到系统路径(无权限)
meson setup $builddir --prefix=${path to install}
ninja -C $builddir
ninja -C $builddir install
可在文件夹下新建一个build
作为$builddir
, install
位置可以就设为pango-1.51.0
文件夹.
按步骤安装完毕后, 在.bashrc
中写入pangocairo.pc
所在的位置
先查找
$ find ./ -name "pangocairo.pc"
./lib/x86_64-linux-gnu/pkgconfig/pangocairo.pc
./build/meson-private/pangocairo.pc
所以在.bashrc
中写入
# pkg-config path
export PKG_CONFIG_PATH="/path/to/pango-1.51.2/lib/x86_64-linux-gnu/pkgconfig:$PKG_CONFIG_PATH"
先source ~/.bashrc
再次进行pip install manim
即可.
Original error: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory
类似地, 在.bashrc
加入环境变量
# 修改为对应的pango路径
export LD_LIBRARY_PATH="/pango/path/pango-1.51.2/lib/x86_64-linux-gnu/:$LD_LIBRARY_PATH"
ImportError: /lib/x86_64-linux-gnu/libgobject-2.0.so.0: undefined symbol: ffi_type_uint32, version LIBFFI_BASE_7.0
根据comment, 设置环境变量
export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libffi.so.7
Unknown encoder ‘libx264’
卸载重装ffmpeg
即可
FileNotFoundError: [Errno 2] No such file or directory: ‘xdg-open’
视频已经成功生成, 应该是在服务器终端无法自动打开的意思?
这个comment说更新sededu
, 下载之后好像不起作用.
参考这个, 尝试手动安装xdg-utils.
下载xdg-utils-v1.2.1
./configure --prefix=/path/to/install
make && make install -j8
/usr/bin/xmlto: not found/home/stlinpeiyang/lpy22/software/xmlto-0.0.28
安装xmlto
尝试从这里尝试安装xmlto
./configure --prefix=/path/to/install
make && make install -j8
没问题, 填入环境变量再次尝试安装xdg
失败 暂时no way
直接安装deb包
从这里下载xdg-utils_1.1.3
使用
# 应该要使用绝对路径才有效
dpkg -x xdg-utils_1.1.3-2ubuntu1_all.deb /path/to/install
然后就会在路径下生成usr/bin
等文件夹和文件
(py_LLM) user@ubuntu:~/lpy22/software$ ls .local/usr/bin/
browse xdg-desktop-menu xdg-icon-resource xdg-open xdg-settings
xdg-desktop-icon xdg-email xdg-mime xdg-screensaver
然后加入环境变量.
安装cairo
下载文件cairo-1.18.0
error: unknown type name ‘pixman_dither_t’; did you mean ‘pixman_filter_t’?
954 | pixman_dither_t pixman_dither = _cairo_dither_to_pixman_dither (source->dither);
| ^~~~~~~~~~~~~~~
| pixman_filter_t
../src/cairo-image-surface.c:954:37: error: implicit declaration of function ‘_cairo_dither_to_pixman_dither’ [-Werror=implicit-function-declaration]
954 | pixman_dither_t pixman_dither = _cairo_dither_to_pixman_dither (source->dither);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/cairo-image-surface.c:955:5: error: implicit declaration of function ‘pixman_image_set_dither’; did you mean ‘pixman_image_set_filter’? [-Werror=implicit-function-declaration]
955 | pixman_image_set_dither (surface->pixman_image, pixman_dither);
| ^~~~~~~~~~~~~~~~~~~~~~~
| pixman_image_set_filter
cc1: some warnings being treated as errors
[171/722] Compiling C object src/libcairo.so.2.11800.0.p/cairo-pdf-surface.c.o
ninja: build stopped: subcommand failed.
遂放弃.