我正在尝试在我的 Ubuntu 21.04 设置上安装 Libcamera。我按照教程运行
$ pip3 install --user meson
$ pip3 install --user --upgrade meson
$ git clone https://git.libcamera.org/libcamera/libcamera.git
$ cd libcamera
$ CC=clang CXX=clang++ meson build -Dpipelines=uvcvideo,ipu3 -Dprefix=/usr
$ ninja -C build
$ sudo ninja -C build install
但我收到了一条错误消息
ninja: Entering directory `build'
[1/2] Installing files.
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 140, in run
return options.run_func(options)
File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 554, in run
installer.do_install(datafilename)
File "/usr/lib/python3/dist-packages/mesonbuild/minstall.py", line 359, in do_install
d = self.check_installdata(pickle.load(ifile))
AttributeError: Can't get attribute 'OctalInt' on <module 'mesonbuild.coredata' from '/usr/lib/python3/dist-packages/mesonbuild/coredata.py'>
FAILED: meson-install
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.
我该如何修复这个错误?
答案1
首先请注意libcamera
适用于最新的 Ubuntu 版本。
要开始使用它,你必须安装所需的开发包
sudo apt-get install libcamera-dev
如果你确实需要从源代码编译它 - 那么启用源代码存储库(deb-源文件)使用软件和更新(software-properties-gtk
),然后通过以下方式获取其构建依赖项
sudo apt-get build-dep libcamera-dev
然后继续编译。