yum升级php成PHP 5.2.17并解决You could try using --skip-broken
2012-02-08 16:17:02   来源:   评论:0 点击:

yum升级php成PHP 5.2.17并解决You could try using --skip-broken to work around the problem错误

yum升级php成PHP 5.2.17并解决You could try using --skip-broken to work around the problem错误

原创作品  作者:linuxzgf  原文:http://www.f5ha.com/2012/0208/2MMDAwMDAwMDY2Mw.html
转载请注明:运维之家/运维家园
欢迎转载运维之家/运维家园文章到自己的网站/博客/微博,请勿修改原文内容,谢谢!

1、原系统是没有源,需要添加源
2、添加源后升级出现错误
--> Finished Dependency Resolution
php-gd-5.2.17-12.el5.x86_64 from CentALT has depsolving problems
  --> Missing Dependency: libt1.so.5()(64bit) is needed by package
  php-gd-5.2.17-12.el5.x86_64 (CentALT)
Error: Missing Dependency: libt1.so.5()(64bit) is needed by package
php-gd-5.2.17-12.el5.x86_64 (CentALT)
 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

3、解决错误升级成功

 

[root@localhost yum.repos.d]# yum update php
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.cs.pu.edu.tw
 * extras: ftp.cs.pu.edu.tw
 * updates: ftp.cs.pu.edu.tw
Setting up Update Process
No Packages marked for Update

 

[root@localhost yum.repos.d]# vi CentOS-Base.repo

[CentALT]
name=CentALT Packages for Enterprise Linux 5 - $basearch
baseurl=http://centos.alt.ru/repository/centos/5/$basearch/
enabled=1
gpgcheck=0

 

[root@localhost yum.repos.d]# yum update php                
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: ftp.tc.edu.tw
 * extras: ftp.tc.edu.tw
 * updates: ftp.cs.pu.edu.tw
Setting up Update Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: php = 5.1.6-27.el5_7.5 for package: php-devel
---> Package php.x86_64 0:5.2.17-12.el5 set to be updated
--> Processing Dependency: php-cli = 5.2.17-12.el5 for package: php
--> Processing Dependency: php-common = 5.2.17-12.el5 for package: php
--> Running transaction check
---> Package php-cli.x86_64 0:5.2.17-12.el5 set to be updated
--> Processing Dependency: php-zend-abi = 20050922 for package: php-pecl-memcache
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-snmp
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-mysql
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-pdo
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package:
php-mbstring
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-xml
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-imap
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-pgsql
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-ldap
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-odbc
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-bcmath
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-gd
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-xmlrpc
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-dba
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-soap
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-ncurses
---> Package php-common.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-devel.x86_64 0:5.2.17-12.el5 set to be updated
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-dba.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-gd.x86_64 0:5.2.17-12.el5 set to be updated
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd
---> Package php-imap.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-ldap.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-mbstring.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-mysql.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-ncurses.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-odbc.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-pdo.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-pecl-memcache.x86_64 0:3.0.6-1.el5 set to be updated
---> Package php-pgsql.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-snmp.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-soap.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-xml.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-xmlrpc.x86_64 0:5.2.17-12.el5 set to be updated
--> Running transaction check
---> Package libXpm.x86_64 0:3.5.5-3 set to be updated
---> Package php-gd.x86_64 0:5.2.17-12.el5 set to be updated
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd
--> Finished Dependency Resolution
php-gd-5.2.17-12.el5.x86_64 from CentALT has depsolving problems
  --> Missing Dependency: libt1.so.5()(64bit) is needed by package
  php-gd-5.2.17-12.el5.x86_64 (CentALT)
Error: Missing Dependency: libt1.so.5()(64bit) is needed by package
php-gd-5.2.17-12.el5.x86_64 (CentALT)
 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


[root@localhost yum.repos.d]# yum remove php-gd

卸载后重新升级可以完成


[root@localhost yum.repos.d]# yum update php                
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: ftp.tc.edu.tw
 * extras: ftp.tc.edu.tw
 * updates: ftp.tc.edu.tw
CentALT                                                 |  951 B     00:00    
CentALT/primary                                         |  77 kB     00:02    
CentALT                                                                269/269
addons                                                  |  951 B     00:00    
addons/primary                                          |  204 B     00:00    
base                                                    | 1.1 kB     00:00    
base/primary                                            | 1.2 MB     00:00    
base                                                                 3566/3566
extras                                                  | 2.1 kB     00:00    
extras/primary_db                                       | 179 kB     00:00    
updates                                                 | 1.9 kB     00:00    
updates/primary_db                                      | 614 kB     00:00    
Setting up Update Process
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: php = 5.1.6-27.el5_7.5 for package: php-devel
---> Package php.x86_64 0:5.2.17-12.el5 set to be updated
--> Processing Dependency: php-cli = 5.2.17-12.el5 for package: php
--> Processing Dependency: php-common = 5.2.17-12.el5 for package: php
--> Running transaction check
---> Package php-cli.x86_64 0:5.2.17-12.el5 set to be updated
--> Processing Dependency: php-zend-abi = 20050922 for package: php-pecl-memcache
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-snmp
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-mysql
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-pdo
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package:
php-mbstring
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-xml
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-imap
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-pgsql
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-ldap
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-odbc
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-bcmath
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-xmlrpc
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-dba
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-soap
--> Processing Dependency: php-common = 5.1.6-27.el5_7.5 for package: php-ncurses
---> Package php-common.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-devel.x86_64 0:5.2.17-12.el5 set to be updated
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-dba.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-imap.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-ldap.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-mbstring.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-mysql.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-ncurses.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-odbc.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-pdo.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-pecl-memcache.x86_64 0:3.0.6-1.el5 set to be updated
---> Package php-pgsql.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-snmp.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-soap.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-xml.x86_64 0:5.2.17-12.el5 set to be updated
---> Package php-xmlrpc.x86_64 0:5.2.17-12.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

===============================================================================
 Package                 Arch         Version              Repository     Size
===============================================================================
Updating:
 php                     x86_64       5.2.17-12.el5        CentALT       1.2 M
Updating for dependencies:
 php-bcmath              x86_64       5.2.17-12.el5        CentALT        33 k
 php-cli                 x86_64       5.2.17-12.el5        CentALT       2.3 M
 php-common              x86_64       5.2.17-12.el5        CentALT       279 k
 php-dba                 x86_64       5.2.17-12.el5        CentALT        40 k
 php-devel               x86_64       5.2.17-12.el5        CentALT       555 k
 php-imap                x86_64       5.2.17-12.el5        CentALT        54 k
 php-ldap                x86_64       5.2.17-12.el5        CentALT        36 k
 php-mbstring            x86_64       5.2.17-12.el5        CentALT       1.1 M
 php-mysql               x86_64       5.2.17-12.el5        CentALT        88 k
 php-ncurses             x86_64       5.2.17-12.el5        CentALT        41 k
 php-odbc                x86_64       5.2.17-12.el5        CentALT        53 k
 php-pdo                 x86_64       5.2.17-12.el5        CentALT        67 k
 php-pecl-memcache       x86_64       3.0.6-1.el5          CentALT        65 k
 php-pgsql               x86_64       5.2.17-12.el5        CentALT        71 k
 php-snmp                x86_64       5.2.17-12.el5        CentALT        29 k
 php-soap                x86_64       5.2.17-12.el5        CentALT       145 k
 php-xml                 x86_64       5.2.17-12.el5        CentALT       120 k
 php-xmlrpc              x86_64       5.2.17-12.el5        CentALT        56 k

Transaction Summary
===============================================================================
Install       0 Package(s)
Upgrade      19 Package(s)

Total download size: 6.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/19): php-snmp-5.2.17-12.el5.x86_64.rpm               |  29 kB     00:00    
(2/19): php-bcmath-5.2.17-12.el5.x86_64.rpm             |  33 kB     00:00    
(3/19): php-ldap-5.2.17-12.el5.x86_64.rpm               |  36 kB     00:00    
(4/19): php-dba-5.2.17-12.el5.x86_64.rpm                |  40 kB     00:00    
(5/19): php-ncurses-5.2.17-12.el5.x86_64.rpm            |  41 kB     00:00    
(6/19): php-odbc-5.2.17-12.el5.x86_64.rpm               |  53 kB     00:00    
(7/19): php-imap-5.2.17-12.el5.x86_64.rpm               |  54 kB     00:00    
(8/19): php-xmlrpc-5.2.17-12.el5.x86_64.rpm             |  56 kB     00:00    
(9/19): php-pecl-memcache-3.0.6-1.el5.x86_64.rpm        |  65 kB     00:00    
(10/19): php-pdo-5.2.17-12.el5.x86_64.rpm               |  67 kB     00:00    
(11/19): php-pgsql-5.2.17-12.el5.x86_64.rpm             |  71 kB     00:00    
(12/19): php-mysql-5.2.17-12.el5.x86_64.rpm             |  88 kB     00:00    
(13/19): php-xml-5.2.17-12.el5.x86_64.rpm               | 120 kB     00:00    
(14/19): php-soap-5.2.17-12.el5.x86_64.rpm              | 145 kB     00:00    
(15/19): php-common-5.2.17-12.el5.x86_64.rpm            | 279 kB     00:00    
(16/19): php-devel-5.2.17-12.el5.x86_64.rpm             | 555 kB     00:00    
(17/19): php-mbstring-5.2.17-12.el5.x86_64.rpm          | 1.1 MB     00:05    
(18/19): php-5.2.17-12.el5.x86_64.rpm                   | 1.2 MB     00:03    
(19/19): php-cli-5.2.17-12.el5.x86_64.rpm               | 2.3 MB     00:02    
-------------------------------------------------------------------------------
Total                                          245 kB/s | 6.3 MB     00:26    
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : php-common                                             1/38
warning: /etc/php.ini created as /etc/php.ini.rpmnew
  Updating       : php-pdo                                                2/38
  Updating       : php-cli                                                3/38
  Updating       : php                                                    4/38
  Updating       : php-dba                                                5/38
  Updating       : php-xml                                                6/38
  Updating       : php-soap                                               7/38
  Updating       : php-pgsql                                              8/38
  Updating       : php-mysql                                              9/38
  Updating       : php-imap                                              10/38
  Updating       : php-mbstring                                          11/38
  Updating       : php-snmp                                              12/38
  Updating       : php-pecl-memcache                                     13/38
  Updating       : php-ldap                                              14/38
  Updating       : php-bcmath                                            15/38
  Updating       : php-ncurses                                           16/38
  Updating       : php-xmlrpc                                            17/38
  Updating       : php-odbc                                              18/38
  Updating       : php-devel                                             19/38
  Cleanup        : php-dba                                               20/38
  Cleanup        : php-common                                            21/38
  Cleanup        : php-xml                                               22/38
  Cleanup        : php-soap                                              23/38
  Cleanup        : php-pgsql                                             24/38
  Cleanup        : php                                                   25/38
  Cleanup        : php-mysql                                             26/38
  Cleanup        : php-imap                                              27/38
  Cleanup        : php-mbstring                                          28/38
  Cleanup        : php-snmp                                              29/38
  Cleanup        : php-pecl-memcache                                     30/38
  Cleanup        : php-ldap                                              31/38
  Cleanup        : php-bcmath                                            32/38
  Cleanup        : php-pdo                                               33/38
  Cleanup        : php-ncurses                                           34/38
  Cleanup        : php-xmlrpc                                            35/38
  Cleanup        : php-cli                                               36/38
  Cleanup        : php-odbc                                              37/38
  Cleanup        : php-devel                                             38/38

Updated:
  php.x86_64 0:5.2.17-12.el5                                                  

Dependency Updated:
  php-bcmath.x86_64 0:5.2.17-12.el5       php-cli.x86_64 0:5.2.17-12.el5     
  php-common.x86_64 0:5.2.17-12.el5       php-dba.x86_64 0:5.2.17-12.el5     
  php-devel.x86_64 0:5.2.17-12.el5        php-imap.x86_64 0:5.2.17-12.el5    
  php-ldap.x86_64 0:5.2.17-12.el5         php-mbstring.x86_64 0:5.2.17-12.el5
  php-mysql.x86_64 0:5.2.17-12.el5        php-ncurses.x86_64 0:5.2.17-12.el5 
  php-odbc.x86_64 0:5.2.17-12.el5         php-pdo.x86_64 0:5.2.17-12.el5     
  php-pecl-memcache.x86_64 0:3.0.6-1.el5  php-pgsql.x86_64 0:5.2.17-12.el5   
  php-snmp.x86_64 0:5.2.17-12.el5         php-soap.x86_64 0:5.2.17-12.el5    
  php-xml.x86_64 0:5.2.17-12.el5          php-xmlrpc.x86_64 0:5.2.17-12.el5  

Complete!
[root@localhost yum.repos.d]# php --version
PHP 5.2.17 (cli) (built: Feb  3 2012 13:33:41)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
[root@localhost yum.repos.d]#


有人说安装这个可以解决 不过安装不成功
yum install t1lib* --nogpgcheck

相关热词搜索:yum升级php成PHP 5.2.17

上一篇:shell脚本调试方法(linux/unix )
下一篇:Linux/UNIX 下的有用的命令dd命令详解

分享到: 收藏
评论排行