libwebp
https://github.com/webmproject/libwebp/archive/refs/tags/v1.2.0.tar.gz
libvips
https://github.com/libvips/libvips/releases/download/v8.12.0/vips-8.12.0.tar.gz
三、编译环境安装步骤 安装libwebp1.安装jpeg tiff png扩展
yum -y install libjpeg-devel libpng-devel libtiff-devel
2.安装编译libwebp时依赖
yum -y install gcc make
3.解压包,开始安装libwebp-1.2.0
tar xf libwebp-1.2.0.tar.gz cd libwebp-1.2.0
编译参数描述:
--prefix=/usr/lib64 # 安装的目录
--enable-libwebpmux # 开启libwebpmux
--enable-libwebpdemux # 开启libwebpdemux
--enable-libwebpdecoder # 开启libwebpdecoder
--enable-libwebpextras # 开启libwebpextras
--enable-static # 静态库
./autogen.sh ./configure --prefix=/usr/lib64 --enable-libwebpmux --enable-libwebpdemux --enable-libwebpdecoder --enable-libwebpextras --enable-static
configure后的截图 (可看到需要enable的扩展都是yes)
# configure没问题就可以开始安装了
make && make install
# 查找pkgconfig(编译安装的libwebp.pc位置不是系统默认里面)
也可在编译时指定用 PKG_CONFIG_PATH=/usr/lib64/lib/pkgconfig 指定
# 查看pkgconfig存在
find /usr/lib64 -name pkgconfig cp /usr/lib64/lib/pkgconfig/* /usr/lib64/pkgconfig/安装libvips
1.安装libvips编译时依赖
yum -y install expat-devel gcc-c++ gtk-doc gobject-introspection-devel
2.解压包,开始安装
tar xf vips-8.12.0.tar.gz cd vips-8.12.0
3. 编译安装(可看到4个扩展都是yes)
./autogen.sh ./configure make make install四、编译过程错误 1、./autogen.sh: line 2: exec: autoreconf: not found
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
yum -y install gobject-introspection-devel2、error: newly created file is older than distributed files! Check your system clock
yum -y install ntpdate ntpdate ntp1.aliyun.com3.configure: error: Could not find the Expat library
yum -y install expat-devel4.../../libtool: line 1765: g++: command not found
yum -y install gcc-c++5./autogen.sh: line 28: gtkdocize: command not found
yum -y install gtk-doc五、镜像信息(将编译的so文件,打入到镜像)
镜像信息:centos:7.2.1511
FROM centos:7.2.1511
ADD libwebp.tar.gz /usr/lib64/
ADD libvips.tar.gz /usr/lib64/
RUN yum -y install pango-devel libjpeg-devel libpng-devel libtiff-devel
&& yum clean all
&& echo '/usr/lib64/libwebp' >> /etc/ld.so.conf
&& echo '/usr/lib64/libvips' >> /etc/ld.so.conf
&& ldconfig
&& mv /usr/lib64/libvips/vips* /usr/bin/



