幸运彩票官网注册网址_幸运彩票网投平台怎么样_幸运彩票网站大全开户正规吗_幸运彩票网手机版登录

做您身边的电脑顾问

注册

热点: Ubuntu 安装drcom报错error的处 Chrome在Ubuntu下使用ramdisk的

您现在的位置是:主页 > 幸运彩票网投平台 > Ubuntu专区 > 应用技巧 >

升级Ubuntu系统中的GD库到完整版

时间:2010-09-29 15:14   来源:未知   复制分享 共有评论(0)条

点击:

  一般情况下我们在Ubuntu的Linux发行版本中安装LAMPP环境都是直接通过apt-get的方式来进行安装(方便,可以偷懒!呵呵)!

  虽然很方便,但是在这些集成版本中多多少少也存在一些问题。

  比方说PHP5-GD库~ 我们安装好后发现phpinfo中的提示是 2.0 or higher. 虽然大部分的功能都有,但是这个库并不完整。

  在一次西林我做 Drupal项目中就出现 Drupal 报错,导致image模块的部分功能缺失!开始还很诧异,问了一下朋友,朋友说应该不会出现这样的问题(后来才知道,他一直都是编译安装 T-T)。

  报错的信息如下:

  GD Image Filtering 和 GD Image Rotation 无法正常工作,系统提示的意思为该GD库版本不是官方的发行版本!

  于是我开始在网上找这方面的问题,发现所有的Ubuntu和debian用户都存在这样的问题。

  因为使用DRUPAL国内用户少,所以问题不是很明显。去国外的一些网站查的时候找到了解决办法。(E文太差,找起来费劲!)

  主要问题就在GD库上,很多人说APT包中的GD库是被修改过的,然后再编译整合。所以会出现不能功能的缺失。既然找到问题所在了就有办法解决。我在 Cumu.li 的网站上看到他提出的解决办法。BLOG原文如下:

  I’ve been installing the LAMP stack on an Ubuntu based server for a client. They rely on the version of LibGD that’s bundled with PHP5. This version includes certain functions including imagerotate() and others.

  It seems that the people who build Ubuntu (and Debian) distribution do not want to compile PHP5 with the version of GD that comes bundled with PHP5. As far as I can tell the guys at Ubuntu (and Debian) consider this to be a fork of the original GD library and think that this could be a security risk. Their stance on it is that if PHP want to use this version then they should contribute the changes that have been made to the original GD library back to the core project. This seems fair enough, but unfortunately I can’t immediately change the direction of an open source project this big – or probably any project, come to think about it!

  After a bit of rummaging around on the Internet I found nothing to do with actually compiling in this support, so I tried to work out how to do this… In theory! I found a link on Ubuntu forums about including the GMP library I roughly followed this through.

  (西林我的E文水平差就不献丑翻译了!基本就是建议大家重新下载源码,然后在编译打包!)

  具体操作如下:

  先下载个源码包

  # Install build tools, debian helpers and fakeroot

  apt-get install build-essential debhelper fakeroot

  # source code should reside in /usr/src

  cd /usr/src

  # Download PHP source

  apt-get source php5

  # Install all packages required to build PHP5

  apt-get build-dep php5

  cd php5-5.2.3

(责任编辑:狗扑源码社区)

顶一下
(0)
0%
踩一下
(0)
0%
发表评论
发布言论时请自觉遵守互联网相关的政策法规!
评价:
用户名: 验证码:点击我更换图片