Ubuntu 18.04下编译libjpeg-turbo
解压:
tar -xzvf libjpeg-turbo-1.5.3.tar.gz
安装编译依赖包:
sudo apt-get install nasm
sudo apt-get install libtool
进入源码目录然后执行
autoreconf -fiv
这里可能会遇到一个错误,需要执行rm -rf /usr/local/lib/libjpeg.so*
如果没有遇到则不需要删除
configure.ac:21: error: possibly undefined macro: AC_PROG_LIBTOOL
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
执行
./configure --prefix=/usr/local --mandir=/usr/local/share/man --with-jpeg8 --disable-static --docdir=/usr/local/share/doc/libjpeg-turbo-1.5.3
完成后,执行make进行编译
再执行make install 安装