Centos5
在 centos 5.8 上安裝 PHP 5.3 Pear
我剛剛使用 32 位 Centos 5.8 創建了一個 VPS,並安裝了 php53 和許多其他 php 5.3 軟體包。我想使用 yum 安裝 memcached,但出現以下錯誤
Resolving Dependencies --> Running transaction check ---> Package php-pecl-memcached.i386 0:1.0.0-1.el5 set to be updated --> Processing Dependency: php-zend-abi = 20050922 for package: php-pecl-memcached --> Processing Dependency: libmemcached.so.2(libmemcached_2) for package: php-pecl-memcached --> Processing Dependency: libmemcached.so.2 for package: php-pecl-memcached --> Running transaction check ---> Package libmemcached.i386 0:0.31-1.1.el5 set to be updated ---> Package php-common.i386 0:5.1.6-40.el5_9 set to be updated --> Processing Conflict: php53-common conflicts php-common --> Finished Dependency Resolution php53-common-5.3.3-13.el5_9.1.i386 from installed has depsolving problems --> php53-common conflicts with php-common Error: php53-common conflicts with php-common You could try using --skip-broken to work around the problem You could try running: package-cleanup --problems package-cleanup --dupes rpm -Va --nofiles --nodigest The program package-cleanup is found in the yum-utils package.
嘗試了包清理和上面消息中提到的所有其他內容,但仍然無法安裝,所以我想從 PECL 庫安裝它並繼續為 PHP5.3 安裝 PEAR
yum install php53-pear
我收到一個錯誤
No package php53-pear available. Nothing to do
所以我嘗試了(愚蠢的事情!)
yum install php-pear
並設法安裝。跟著它
pecl install memcached
我在執行 /var/tmp/pear-build-root/memcached-2.1.0 時遇到以下錯誤: /tmp/tmpCW9TMv/memcached-2.1.0/configure 檢查 egrep… grep -E 檢查 a sed 不截斷輸出… /bin/sed 檢查 cc… 不檢查 gcc… 不配置:錯誤:在 $PATH 中找不到可接受的 C 編譯器 請參閱
config.log' for more details. ERROR:
/tmp/tmpCW9TMv/memcached-2.1.0 /配置’失敗我有點震驚。有沒有辦法在 Centos 5.8 上安裝 PEAR for PHP5.3 並安裝 memcached。
看來您有 2 個版本的 php:5.1.6 和 5.3.3
Processing Conflict: php53-common conflicts php-common
我會建議添加 ius 社區 repo 並從中安裝所有必要的軟體包。從原始碼安裝它在基於 RHEL 的系統上是個壞主意,恕我直言
# rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm # rpm -ivh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-11.ius.el5.noarch.rpm # yum install php53u-pear php53u-pecl-memcached