Utilisation de yum shell pour migrer de php-mysql vers php-mysqlnd

Avec l'arrivée imminante de php 5.5, version qui verra disparaitre la librairie php-mysql, il est grand temps d'entamer une migration vers mysqlnd. Voici donc le mode opératoire pour effectuer ce changement en utilisant yum shell & le dépôt remi sur ma RHEL6.

Pourquoi yum shell ? Car il n'est pas possible de passer par un simple yum install :

root@kalach ~> yum install php-mysqlnd
Loaded plugins: changelog, downloadonly, presto, product-id, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysqlnd.x86_64 0:5.4.14-1.el6.remi will be installed
--> Processing Conflict: php-mysql-5.4.14-1.el6.remi.x86_64 conflicts php-mysqlnd
--> Finished Dependency Resolution
Error: php-mysql conflicts with php-mysqlnd-5.4.14-1.el6.remi.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

En effet php-mysqlnd et php-mysql rentrent en conflit...

Alors essayons de désinstaller php-mysql :

root@kalach ~> yum remove php-mysql
Loaded plugins: changelog, downloadonly, presto, product-id, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Remove Process
Resolving Dependencies
--> Running transaction check
---> Package php-mysql.x86_64 0:5.4.14-1.el6.remi will be erased
--> Processing Dependency: php-mysql for package: php-pluf-1.0-3.gitb1fed2e.el6.remi.noarch
--> Processing Dependency: php-mysql for package: phpMyAdmin-3.5.8.1-1.el6.remi.noarch
--> Processing Dependency: php-mysql for package: cacti-0.8.8a-2.el6.noarch
--> Running transaction check
---> Package cacti.noarch 0:0.8.8a-2.el6 will be erased
---> Package php-pluf.noarch 0:1.0-3.gitb1fed2e.el6.remi will be erased
--> Processing Dependency: php-pluf >= 1.0-3 for package: indefero-1.3.3-1.el6.noarch
---> Package phpMyAdmin.noarch 0:3.5.8.1-1.el6.remi will be erased
--> Running transaction check
---> Package indefero.noarch 0:1.3.3-1.el6 will be erased
--> Finished Dependency Resolution
 
Dependencies Resolved
 
=======================================================================================================
 Package         Arch        Version                          Repository                          Size
=======================================================================================================
Removing:
 php-mysql       x86_64      5.4.14-1.el6.remi                @remi                              449 k
Removing for dependencies:
 cacti           noarch      0.8.8a-2.el6                     @epel                              5.4 M
 indefero        noarch      1.3.3-1.el6                      @/indefero-1.3.3-1.el6.noarch      3.4 M
 php-pluf        noarch      1.0-3.gitb1fed2e.el6.remi        @remi                              1.2 M
 phpMyAdmin      noarch      3.5.8.1-1.el6.remi               @remi                               22 M
 
Transaction Summary
=======================================================================================================
Remove        5 Package(s)
 
Installed size: 33 M
Is this ok [y/N]:

Trop de dépendances !

La solution : yum shell :

root@kalach ~> yum shell                                     13:37
Loaded plugins: changelog, downloadonly, presto, product-id, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Yum Shell
> install php-mysqlnd
Setting up Install Process
> remove php-mysql
Setting up Remove Process
> run
--> Running transaction check
---> Package php-mysql.x86_64 0:5.4.14-1.el6.remi will be erased
---> Package php-mysqlnd.x86_64 0:5.4.14-1.el6.remi will be installed
--> Finished Dependency Resolution
 
================================================================================
 Package            Arch          Version                    Repository    Size
================================================================================
Installing:
 php-mysqlnd        x86_64        5.4.14-1.el6.remi          remi         260 k
Removing:
 php-mysql          x86_64        5.4.14-1.el6.remi          @remi        449 k
 
Transaction Summary
================================================================================
Install       1 Package(s)
Remove        1 Package(s)
 
Total download size: 260 k
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 260 k
php-mysqlnd-5.4.14-1.el6.remi.x86_64.rpm                 | 260 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : php-mysqlnd-5.4.14-1.el6.remi.x86_64                         1/2 
  Erasing    : php-mysql-5.4.14-1.el6.remi.x86_64                           2/2 
  Verifying  : php-mysqlnd-5.4.14-1.el6.remi.x86_64                                                                                                                                                         1/2 
  Verifying  : php-mysql-5.4.14-1.el6.remi.x86_64                                                                                                                                                           2/2 
 
Removed:
  php-mysql.x86_64 0:5.4.14-1.el6.remi                                                                                                                                                                          
 
Installed:
  php-mysqlnd.x86_64 0:5.4.14-1.el6.remi                                                                                                                                                                        
 
Finished Transaction
> exit
Leaving Shell

Et voila, bien sûr on peut utiliser yum shell pour d'autres opérations.

2 réactions

Attribution - Partage dans les Mêmes Conditions 4.0 International