Chinaunix首页 | 论坛 | 博客
  • 博客访问: 762291
  • 博文数量: 790
  • 博客积分: 40560
  • 博客等级: 大将
  • 技术积分: 5065
  • 用 户 组: 普通用户
  • 注册时间: 2008-08-28 16:29
文章分类

全部博文(790)

文章存档

2011年(1)

2008年(789)

我的朋友

分类: LINUX

2008-08-28 17:15:28

 
昨天,在CentOS系统上,安装Fleaphp,运行其中一个“像册”范例,其功能包括上传图片,并生成图片的缩略图,发现不能对图片进行处理,报错:Calltoundefinedfunction:imagecreatefromjpeg()in。

于是查手册,猜测是没有安装GD,到网上找到了《GD:Linux下安装PHP的GD支持库》一文,依此安装,但是发现并不适合我的当前情况,因为我的系统已用yum安装了php,晚上就此问题请教甜饼,得知,yuminstallphp-gd即可。

今天照此操练,但由于粗心,误将php-gd写为php-gb,所以报错:
class=''codetop''>CODE:class=''codemain''>Readingrepositorymetadatainfromlocalfiles
primary.xml.gz100%|=========================|1.0MB00:28
[Errno-1]Metadatafiledoesnotmatchchecksum
Tryingothermirror.
Error:failure:repodata/primary.xml.gzfromdag:[Errno256]Nomoremirrorstotry.

由于,没有发现这个输入错误,所以手工下载了primary.xml.gz,但是这个文件应该放在哪里呢,于是就此问题请教小仲,“只要你能让yum找到这个文件就可以了”。rpm-qlphp,查到php的安装路径,猜测应该将primary.xml.gz文件复制到/usr/share/doc。

然后再次yuminstallphp-gb,yum果然找到了它:
class=''codetop''>CODE:class=''codemain''>Readingrepositorymetadatainfromlocalfiles
primary.xml.gz100%|=========================|1.8MB00:34
dag:##################################################7811/7811
Added1newpackages,deleted0oldin40.68seconds
Parsingpackageinstallarguments
NoMatchforargument:php-gb
Nothingtodo

这是才发现这个输入错误,于是重新yum-yinstallphp-gd,安装成功,“像册”范例运行正确。

阅读(213) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~