Centos / php-pgsql

Patricio Muñoz patricio.munoz en cmet.net
Jue Mayo 5 15:05:31 CLT 2005


Estimados,

Instale CentOS 4, y juto con ello la ultima version de Postgres (8.0.2), 
donde no tuve problemas, pero al instalar el modulo php-pgsql, 
aparecieron errores de dependencias. He aqui un extracto de los errores 
desplegados:

--> Processing Dependency: postgresql-libs = 8.0.2 for package: 
postgresql-devel
--> Processing Dependency: libpq.so.4 for package: postgresql-python
--> Processing Dependency: libpq.so.4 for package: postgresql
--> Processing Dependency: libpq.so.4 for package: postgresql-server
--> Processing Dependency: libpq.so.4 for package: postgresql-contrib
--> Finished Dependency Resolution
Error: Missing Dependency: libpq.so.4 is needed by package postgresql-python
Error: Missing Dependency: postgresql-libs = 8.0.2 is needed by package 
postgresql-devel
Error: Missing Dependency: libpq.so.4 is needed by package postgresql
Error: Missing Dependency: libpq.so.4 is needed by package postgresql-server
Error: Missing Dependency: libpq.so.4 is needed by package 
postgresql-contrib

Para solucionar el problema, me sugerieron bajar el o los fuentes de las 
aplicaciones que usen Postgres y recompilar el/los paquete(s). Para tal 
efecto baje el archivo php-4.3.9-3.2.src.rpm y relize los siguientes pasos:

1. rpm -Uvh php-4.3.9-3.2.src.rpm
2. rpmbuild -bb /usr/src/redhat/SPECS/php.spec

Esto genero todos los archivos rpm de php:

php-4.3.9-3.2.i386.rpm
php-devel-4.3.9-3.2.i386.rpm
php-domxml-4.3.9-3.2.i386.rpm
php-gd-4.3.9-3.2.i386.rpm
php-imap-4.3.9-3.2.i386.rpm
php-ldap-4.3.9-3.2.i386.rpm
php-mbstring-4.3.9-3.2.i386.rpm
php-mysql-4.3.9-3.2.i386.rpm
php-ncurses-4.3.9-3.2.i386.rpm
php-odbc-4.3.9-3.2.i386.rpm
php-pear-4.3.9-3.2.i386.rpm
php-pgsql-4.3.9-3.2.i386.rpm
php-snmp-4.3.9-3.2.i386.rpm
php-xmlrpc-4.3.9-3.2.i386.rpm

3. rpm -Uvh php-pgsql-4.3.9-3.2.i386.rpm

Hasta aqui todo ok.

4. yum update

[root en kalisto i386]# yum update
Setting up Update Process
Setting up Repos
update                    100% |=========================|  951 B 
00:00
base                      100% |=========================| 1.1 kB 
00:00
addons                    100% |=========================|  951 B 
00:00
extras                    100% |=========================| 1.1 kB 
00:00
Reading repository metadata in from local files
update    : ################################################## 104/104
base      : ################################################## 1404/1404
addons    : ################################################## 2/2
extras    : ################################################## 25/25
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package php-mbstring.i386 0:4.3.9-3.6 set to be updated
---> Package php-xmlrpc.i386 0:4.3.9-3.6 set to be updated
---> Package php-odbc.i386 0:4.3.9-3.6 set to be updated
---> Package php-snmp.i386 0:4.3.9-3.6 set to be updated
---> Package php-devel.i386 0:4.3.9-3.6 set to be updated
---> Package php-gd.i386 0:4.3.9-3.6 set to be updated
---> Package php-imap.i386 0:4.3.9-3.6 set to be updated
---> Package php-ncurses.i386 0:4.3.9-3.6 set to be updated
---> Package php-pgsql.i386 0:4.3.9-3.6 set to be updated
---> Package php-pear.i386 0:4.3.9-3.6 set to be updated
---> Package php-mysql.i386 0:4.3.9-3.6 set to be updated
---> Package php.i386 0:4.3.9-3.6 set to be updated
---> Package php-domxml.i386 0:4.3.9-3.6 set to be updated
---> Package php-ldap.i386 0:4.3.9-3.6 set to be updated
--> Running transaction check
--> Processing Dependency: libpq.so.3 for package: php-pgsql
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package postgresql-libs.i386 0:7.4.7-2.RHEL4.1 set to be updated
--> Running transaction check
--> Processing Dependency: postgresql-libs = 8.0.2 for package: 
postgresql-devel
--> Processing Dependency: libpq.so.4 for package: postgresql-python
--> Processing Dependency: libpq.so.4 for package: postgresql
--> Processing Dependency: libpq.so.4 for package: postgresql-server
--> Processing Dependency: libpq.so.4 for package: postgresql-contrib
--> Finished Dependency Resolution
Error: Missing Dependency: postgresql-libs = 8.0.2 is needed by package 
postgresql-devel
Error: Missing Dependency: libpq.so.4 is needed by package postgresql-python
Error: Missing Dependency: libpq.so.4 is needed by package postgresql
Error: Missing Dependency: libpq.so.4 is needed by package postgresql-server
Error: Missing Dependency: libpq.so.4 is needed by package 
postgresql-contrib

Mi pregunta es:

1. Los errores desplegador por yum (por la biblioteca libpq.so.4) 
traeran alguna consecuencia en el futuro ?

Segun lei, la version de Postgres 8.0.2 para rhel-es-4 esta compilada 
con la biblioteca libpq.so.3, y el modulo php-pgsql (por ejemplo) fue 
compilada con la version libpq.so.4.

Estoy en lo correcto ?

saludos





Más información sobre la lista de distribución Linux