安装 libbpg

1. 安装yasm
wget http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz  
tar zxvf yasm-1.3.0.tar.gz #解压
cd yasm-1.3.0 #进入目录 
./configure #配置 
make && make install #编译安装
//如果提示权限问题,可以在指令前添加sudo使用管理员权限,或者使用如下命令实现超级管理员权限
sudo su

//2-安装sdl包,可以直接安装如下包
sudo apt-get install libsdl-image1.2-dev
centos yum search *SDL*

3. 安装libpng

git clone https://github.com/glennrp/libpng

cd libpng
./configure
make -j 3
make install
ldconfig /usr/local/lib
(centos /sbin/ldconfig /usr/local/lib)
 
4. 安装libbpg https://bellard.org/bpg/

BPG Makefile中在编译时没有指定链接lnuma,在 “LIBS+= -lm -lpthread” 后面加 “-lnuma”即可,之后再编译,就能成功得到bpgenc和bpgdec

make && make install

原文地址:https://www.cnblogs.com/feng-ying/p/14826136.html