1. 安装必须的包
yum install glib2-devel cairo-devel libjpeg-turbo-devel-1.2.90-8.el7.x86_64 libtiff-devel-4.0.3-32.el7.x86_64 -y
2. 下载tar包
wget http://download.mono-project.com/sources/libgdiplus/libgdiplus0-6.0.4.tar.gz
3. 其实安装部分包之前会提示错误比如文件头不存在, 处理方法也比较简单
错误提示信息
CCLD testimageattributes CC testjpegcodec.o testjpegcodec.c:24:21: fatal error: jpeglib.h: No such file or directory #include <jpeglib.h> ^ compilation terminated. make[2]: *** [testjpegcodec.o] Error 1 make[2]: Leaving directory `/libgdi/libgdiplus-6.0.4/tests‘ make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/libgdi/libgdiplus-6.0.4‘ make: *** [all] Error 2
解决办法:
yum provides ‘*/jpeglib.h‘
效果一般为:
注意选择相应的架构和比较常见的rpm包就可以了.
[root@CentOS77 libgdi]# yum provides ‘*/jpeglib.h‘ Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: mirrors.cn99.com * epel: mirrors.aliyun.com * extras: mirrors.cn99.com * updates: mirrors.cn99.com libjpeg-turbo-devel-1.2.90-8.el7.i686 : Headers for the libjpeg-turbo library Repo : base Matched from: Filename : /usr/include/jpeglib.h libjpeg-turbo-devel-1.2.90-8.el7.x86_64 : Headers for the libjpeg-turbo library Repo : base Matched from: Filename : /usr/include/jpeglib.h mingw32-libjpeg-turbo-1.3.1-4.el7.noarch : MinGW Windows Libjpeg-turbo library Repo : epel Matched from: Filename : /usr/i686-w64-mingw32/sys-root/mingw/include/jpeglib.h mingw64-libjpeg-turbo-1.3.1-4.el7.noarch : MinGW Windows Libjpeg-turbo library Repo : epel Matched from: Filename : /usr/x86_64-w64-mingw32/sys-root/mingw/include/jpeglib.h libjpeg-turbo-devel-1.2.90-8.el7.x86_64 : Headers for the libjpeg-turbo library Repo : @base Matched from: Filename : /usr/include/jpeglib.h
原文:https://www.cnblogs.com/jinanxiaolaohu/p/11997098.html