Началось все с того, что появилась ошибка Call to undefined function pg_connect(). Выяснив, что это не php-скрипт, то выяснил в интернете, что может быть не установлен пакет php5-pgsql. Стоит CentOS.
Ввожу
[console] root@host [/]# yum list php5-pgsql [/console]
Получаю
[console]
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: www.peeje.com
* extras: www.peeje.com
* updates: www.peeje.com
Excluding Packages in global exclude list
Finished
Error: No matching Packages to list
[/console]
Как я понял, что он пишет - нет такого. Выйди покури)
Далее, я пытаюсь установить php5-pgsql
[console]root@host [/]# yum install php5-pgsql[/console]
Он выдает
[console]
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: www.peeje.com
* extras: www.peeje.com
* updates: www.peeje.com
Excluding Packages in global exclude list
Finished
Setting up Install Process
No package php5-pgsql available.
Nothing to do
[/console]
Что означает нет пакетов таких.
Скажите, как его поставить ?
Или может дело не в этом пакете?
Не устанавливается php5-pgsql
yum repolist all
yum clean
yum update
yum search php
Все сделал и он показал следующее:
[console]
=
compat-readline43.i386 : The readline 4.3 library for compatibility with older software.
compat-readline43.x86_64 : The readline 4.3 library for compatibility with older software.
fonts-arabic.noarch : Fonts for Arabic
gollem-h3.noarch : The Horde web-based File Manager.
graphviz-php.x86_64 : PHP extension for graphviz
hddtemp.x86_64 : Hard disk temperature tool
horde.noarch : The common Horde Framework for all Horde modules.
imp-h3.noarch : The Internet Messaging Program: webmail access to IMAP/POP3 accounts.
ingo-h3.noarch : The Horde web-based Email Filter Rules Manager.
iproute.x86_64 : Advanced IP routing and network device configuration tools.
kronolith-h3.noarch : The Horde calendar application.
libc-client.i386 : C-client mail access routines for IMAP and POP protocols
libc-client.x86_64 : C-client mail access routines for IMAP and POP protocols
mnemo-h3.noarch : The Horde note manager application.
nag-h3.noarch : The Horde task list manager.
readline.i386 : A library for editing typed command lines.
readline.x86_64 : A library for editing typed command lines.
readline-devel.i386 : Files needed to develop programs which use the readline library.
readline-devel.x86_64 : Files needed to develop programs which use the readline library.
totem.i386 : Movie player for GNOME 2
totem.x86_64 : Movie player for GNOME 2
totem-devel.i386 : Libraries/include files for Totem
totem-devel.x86_64 : Libraries/include files for Totem
totem-mozplugin.x86_64 : Mozilla plugin for Totem
turba-h3.noarch : The Horde contact management application.
velocity.x86_64 : Java-based template engine
[/console]
Мне кажется или PHP я тут не вижу)
yum repolist all покажи и cat /etc/redhat-release
И подключи репы contrib и epel. Еще репа есть centalt, рам самый новый php
CentOS release 5.8 (Final)
[console]
root@host [~]# yum repolist all
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: www.peeje.com
* extras: www.peeje.com
* updates: www.peeje.com
Excluding Packages in global exclude list
Finished
repo id repo name status
C5.0-base CentOS-5.0 - Base disabled
C5.0-centosplus CentOS-5.0 - Plus disabled
C5.0-extras CentOS-5.0 - Extras disabled
C5.0-updates CentOS-5.0 - Updates disabled
C5.1-base CentOS-5.1 - Base disabled
C5.1-centosplus CentOS-5.1 - Plus disabled
C5.1-extras CentOS-5.1 - Extras disabled
C5.1-updates CentOS-5.1 - Updates disabled
C5.2-base CentOS-5.2 - Base disabled
C5.2-centosplus CentOS-5.2 - Plus disabled
C5.2-extras CentOS-5.2 - Extras disabled
C5.2-updates CentOS-5.2 - Updates disabled
C5.3-base CentOS-5.3 - Base disabled
C5.3-centosplus CentOS-5.3 - Plus disabled
C5.3-extras CentOS-5.3 - Extras disabled
C5.3-updates CentOS-5.3 - Updates disabled
C5.4-base CentOS-5.4 - Base disabled
C5.4-centosplus CentOS-5.4 - Plus disabled
C5.4-extras CentOS-5.4 - Extras disabled
C5.4-updates CentOS-5.4 - Updates disabled
C5.5-base CentOS-5.5 - Base disabled
C5.5-centosplus CentOS-5.5 - Plus disabled
C5.5-extras CentOS-5.5 - Extras disabled
C5.5-updates CentOS-5.5 - Updates disabled
C5.6-base CentOS-5.6 - Base disabled
C5.6-centosplus CentOS-5.6 - Plus disabled
C5.6-extras CentOS-5.6 - Extras disabled
C5.6-updates CentOS-5.6 - Updates disabled
C5.7-base CentOS-5.7 - Base disabled
C5.7-centosplus CentOS-5.7 - Plus disabled
C5.7-extras CentOS-5.7 - Extras disabled
C5.7-updates CentOS-5.7 - Updates disabled
base CentOS-5 - Base enabled: 3,467+124
c5-media CentOS-5 - Media disabled
centosplus CentOS-5 - Plus disabled
contrib CentOS-5 - Contrib disabled
debug CentOS-5 - Debuginfo disabled
extras CentOS-5 - Extras enabled: 236+32
updates
[/console]
Подключай contrib и epel. И все должно быть супер.
А не подскажешь ссылку на epel и contrib.
В рунете предлагают только это
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
но выдается
[console]root@host [/]# rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
Retrieving http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
error: skipping http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm - transfer failed - Unknown or unexpected error
[/console]
И по ссылке файла нет.
1. Идем в консоль
2. Открываем файл /etc/yum.repos.d/CentOS-Base.repo
3. Включаем Contrib
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=1
4. Устанавливаем epel
[console]rpm -ihv http://dl.fedoraproject.org/pub/epel/5/i386/epel-release-5-4.noarch.rpm[/console]
Для x86_64 архитектуры:
[console]rpm -ihv http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm[/console]
После всего этого yum update
Если нужен CentALT репозиторий, то идем http://centos.alt.ru/?p=120
И вот с CentALT поосторожнее. Эта репа не совместима с офф. Если не нужно, то не используй.
И вообще странно. Этот пакет должен быть а base.
[console][root@ldap ~]# yum info php53-pgsql
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
* base: mirror.yandex.ru
* epel: mirror.xfes.ru
* extras: mirror.yandex.ru
* updates: mirror.yandex.ru
Available Packages
Name : php53-pgsql
Arch : i386
Version : 5.3.3
Release : 5.el5
Size : 73 k
Repo : base
Summary : A PostgreSQL database module for PHP
URL : http://www.php.net/
License : PHP and LGPLv2 and LGPLv2+
Description: Пакет php-pgsql содержит разделяемый динамический объект, вносящий дополнительную
: поддержку баз данных PostgreSQL к языку PHP. PostgreSQL - это объектно-
: реляционная СУБД, поддерживающая практически все конструкции SQL.[/console]
--=XliN=--, спасибо. Поставил epel.
Теперь, как я понял, нужно ставить сам пакет php-psql ?
А мне выдает вот такое:
[console]
root@host [~]# yum info php53-pgsql
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
* base: www.peeje.com
* epel: mirror.csclub.uwaterloo.ca
* extras: www.peeje.com
* updates: www.peeje.com
Excluding Packages in global exclude list
Finished
Error: No matching Packages to list
[/console]
Хз. Надо тебе все файлы реп удалить и заного поставить, а то у тебя зеркала не тру.
то есть все пакеты
[console]
repo id repo name status
base CentOS-5 - Base 3,467+124
contrib CentOS-5 - Contrib 0
epel Extra Packages for Enterprise Linux 5 - x86_64 5,853+1,065
extras CentOS-5 - Extras 236+32
updates CentOS-5 - Updates 97+13
[/console]
через yum remove ?