GD库安装失败求助

重复贴和参考价值不大的帖子,版主维护
回复
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13
送出感谢: 5 次
接收感谢: 0

GD库安装失败求助

#1

帖子 relaxssl » 2009-02-04 17:51

安装php5-gd库,发现安装失败,信息如下:
linux@ubuntu:~$ sudo apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.

Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
php5-gd: Depends: php5-common (= 5.2.4-2ubuntu5.4) but 5.2.6-2ubuntu4 is to be installed
E: Broken packages
linux@ubuntu:~$
请问如何才能成功安装? 难道是php5.2.6默认已经支持gd库?
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13
送出感谢: 5 次
接收感谢: 0

Re: GD库安装失败求助

#2

帖子 relaxssl » 2009-02-04 18:40

onopoc at gmail dot com
22-Nov-2008 09:08
When using Ubuntu Server 8.04.1 & PHP5. If your GD installation isn't working properly or features are missing. You can install a complete bundled (forked) GD libraries without the need to recompile. The following worked for me: http://drupal.org/node/134331#comment-1120427
头像
relaxssl
帖子: 1448
注册时间: 2007-01-30 7:13
送出感谢: 5 次
接收感谢: 0

Re: GD库安装失败求助

#3

帖子 relaxssl » 2009-02-04 18:42

Thanks Djamu
Onopoc - November 22, 2008 - 00:28

Thanks Djamu your solution works for me.

Here is the steps for Ubuntu Server 8.04.1 and PHP5. Like Djamu said it will install a GD pre-compiled working version. It is a complete bundled (forked) GD libraries:

1. If not already done removing your current GD package and its configurations.
sudo apt-get --purge remove

2. Adding 2 lines to your file /etc/apt/sources.list

deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all

3. Updating your current apt-get list
apt-get update

4. Installing working GD package.
apt-get install php5-gd

It will complain about non-authenticated sources, just ignore, it will also update some additional php libs.

When prompt select keep_current modified php.ini

5. Restarting Apache
/etc/init.d/apache2 restart

Enjoy
回复

回到 “归档贴”