系统之家 - 系统光盘下载网站!

当前位置:系统之家 > 系统教程 > Ubuntu安装libgdiplus报错

Ubuntu安装libgdiplus报错怎么办?

时间:2015-01-13 16:07:12 作者:qipeng 来源:系统之家 1. 扫描二维码随时看资讯 2. 请使用手机浏览器访问: https://m.xitongzhijia.net/xtjc/20150113/34707.html 手机查看 评论

  Linux下libgdiplus是一个Mone库,可用于显示web页面的颜色,可是不少人在Ubuntu系统中安装libgdiplus的时候提示错误,导致安装无法完成,遇到这个问题该怎么办么?下面小编就给大家介绍下Ubuntu安装libgdiplus失败的解决方法。

 Ubuntu安装libgdiplus报错怎么办?

  在Ubuntu 14.04 LTS 64位系统中安装libgdiplus2.10.9的时候出现了错误。

  首先下载libgdiplus2.10.9安装包

  进入目录开始configure编译

  。/configure --prefix=/usrmake

  将libgdiplus安装在/usr目录下

  发现在该操作系统报错了:如下

  gdiplus-private.h:33:31: fatal error: freetype/tttables.h: No such file or directory #include ^compilation terminated.make[2]: *** [adjustablearrowcap.lo] Error 1make[2]: Leaving directory `/root/libgdiplus-2.10/src‘make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/root/libgdiplus-2.10’make: *** [all] Error 2root@ubuntu:~/libgdiplus-2.10# sudo ln -s /usr/X11/include/freetype2/freetype/ /usr/X11/include/freetypeln: failed to create symbolic link ‘/usr/X11/include/freetype’: No such file or directory

  这个错误就是说创建/usr/X11/include/freetype链接失败了,因为找不到freetype

  我们打开/usr/include看有没有freetype这个目录,没有吧,但是我们找到了freetype2,这样我们做个链接吧

  ln -s /usr/include/freetype2 /usr/include/freetype

  然后继续make发现错误如下:

  /usr/lib64/libglib-2.0.so.0: could not read symbols: Invalid operationcollect2: error: ld returned 1 exit statusmake[2]: *** [testgdi] Error 1make[2]: Leaving directory `/usr/local/src/libgdiplus-2.10.9/tests‘make[1]: *** [all-recursive] Error 1make[1]: Leaving directory `/usr/local/src/libgdiplus-2.10.9’make: *** [all] Error 2

  解决方法:

  先执行 。/configure 命令, 然后编辑 test/Makefile 文件;将 130 行的 LIBS = -lpthread -lfontconfig 改为 LIBS = -lpthread -lfontconfig -lglib-2.0 -lX11;再次执行 make 命令即可。

  再次make,是不是很快成功了,ok,make install吧

  上面就是Ubuntu安装libgdiplus时出错的解决方法,如果你在安装的时候系统报错了,可以尝试本文介绍的方法进行解决。

标签 Ubuntu

发表评论

0

没有更多评论了

评论就这些咯,让大家也知道你的独特见解

立即评论

以上留言仅代表用户个人观点,不代表系统之家立场

其他版本软件

热门教程

人气教程排行

Linux系统推荐

官方交流群 软件收录