CentOS 安裝libgdi的方法


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

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM