在el5 x86_64上 rpm安装php 5.1.6,在http://rpm.pbone.net/寻找下载php-5.1.6-27.el5.x86_64.rpm
wget ftp://mirror.switch.ch/pool/3/mirror/centos/5.5/os/x86_64/CentOS/php-5.1.6-27.el5.x86_64.rpm
rpm -ivh php-5.1.6-27.el5.x86_64.rpm
warning: php-5.1.6-27.el5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
error: Failed dependencies:
httpd-mmn = 20051115 is needed by php-5.1.6-27.el5.x86_64
php-cli = 5.1.6-27.el5 is needed by php-5.1.6-27.el5.x86_64
php-common = 5.1.6-27.el5 is needed by php-5.1.6-27.el5.x86_64
提示需要依赖安装httpd,php-cli和php-common
分别下载httpd,php-cli和php-common的rpm包
wget ftp://mirror.switch.ch/pool/1/mirror/scientificlinux/5rolling/x86_64/SL/php-cli-5.1.6-27.el5.x86_64.rpm
wget ftp://mirror.switch.ch/pool/1/mirror/scientificlinux/5rolling/x86_64/SL/php-common-5.1.6-27.el5.x86_64.rpm
wget ftp://mirror.switch.ch/pool/3/mirror/centos/5.5/updates/x86_64/RPMS/httpd-2.2.3-43.el5.centos.3.x86_64.rpm
rpm -ivh php-common-5.1.6-27.el5.x86_64.rpm
rpm -ivh httpd-2.2.3-43.el5.centos.3.x86_64.rpm
rpm -ivh php-cli-5.1.6-27.el5.x86_64.rpm
最后
rpm -ivh php-5.1.6-27.el5.x86_64.rpm
即可,这时候运行:
whereis php
php -v
显示
PHP 5.1.6 (cli) (built: Mar 31 2010 12:01:51)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
即表明安装成功。
P.S.:
在找httpd包的时候下了一个src.rpm包:
wget ftp://ftp.is.co.za/mirror/smeserver/releases/testing/8.0beta6/smeupdates-testing/SRPMS/httpd-2.2.3-43.el5.centos.3.src.rpm
在安装rpm -ivh httpd-2.2.3-43.el5.centos.3.src.rpm时提示
warning: user mockbuild does not exist - using root
warning: group mockbuild does not exist - using root,
在网上找原因,见链接http://huangbao.blog.51cto.com/725279/152656
原因:
It's because you are installing a source rpm that was originally built using mock.
The source rpm contains all the binary packages, spec files etc. and from this package the standard rpm's are built.
You need to use the standard SDL_image-1.2.5-4.fc6.386.rpm or x86_64
意思是:需要下载一个已经编译好的标准rpm包。非src的源码package。src的源码package需要rpmbuild。
php rpm 安装顺序 和 依赖关系
最新推荐文章于 2024-07-09 12:06:30 发布