你提到的 cximage 是一个常见的 C++ 图像处理库,但在 Debian / Ubuntu 的官方仓库里通常没有名为 cximage 或 cximagedeb 的 apt 包,所以“直接 apt install cximagedeb”一般是行不通的。
下面给你几种在 Debian 上安装/使用 cximage 的常见方式。
sudo apt update
sudo apt install -y build-essential unzip wget
官方较老的版本(常用):
wget https://github.com/ata4/cximage/archive/refs/heads/master.zip
unzip master.zip
cd cximage-master
也有其他 fork,比如:
- https://github.com/DavidePrati/cximage
- https://github.com/ata4/cximage
一般在 cximage/ 目录下:
make
或如果你是 C++ 项目,直接把源码加进你的工程里也行。
sudo cp -r *.h /usr/local/include/
sudo cp lib/*.a /usr/local/lib/
sudo ldconfig
很多项目直接把 cximage 源码放进来:
git submodule add https://github.com/ata4/cximage.git
然后在 CMakeLists.txt 或 Makefile 里编译即可。
有时候大家会混淆:
libpng-devlibjpeg-devlibtiff-devimagemagickgraphicsmagick如果你是想处理图片,不一定非要用 cximage。
如果你能告诉我:
我可以给你更精确的命令。