set setting reset

脂肪と糖にはたらくやつ

Error: Package: postgresql93-devel-9.3.5-1PGDG.rhel6.x86_64 (pgdg93) Requires: /usr/bin/pkg-config

Centos6.4 で postgresqlyum でインストールしようとしたら依存関係でエラー。

# yum install postgresql-server postgresql-devel --enablerepo=pgdg93 --disablerepo=base
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * epel: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql93-devel.x86_64 0:9.3.5-1PGDG.rhel6 will be installed
--> Processing Dependency: /usr/bin/pkg-config for package: postgresql93-devel-9.3.5-1PGDG.rhel6.x86_64
---> Package postgresql93-server.x86_64 0:9.3.5-1PGDG.rhel6 will be installed
--> Processing Dependency: /usr/bin/pkg-config for package: postgresql93-devel-9.3.5-1PGDG.rhel6.x86_64
--> Finished Dependency Resolution
Error: Package: postgresql93-devel-9.3.5-1PGDG.rhel6.x86_64 (pgdg93)
           Requires: /usr/bin/pkg-config
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

pkg-config というものが足りないと怒られる。 9.3.4 までは怒られなかった気がするが、気のせいかもしれない。

pkg-configは、環境変数PKG_CONFIG_PATHのパスに存在する *.pc ファイルに記録された情報を元に、ビルドの際に必要な文字列を返す。

http://ja.wikipedia.org/wiki/Pkg-config

pkg-config については rpm が配布されているようだったので yum にもあるのではと思ったが、

# yum install pkg-config
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * epel: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Setting up Install Process
No package pkg-config available.
Error: Nothing to do

試しに - を抜いてみると

# yum install pkgconfig
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * base: ftp.tsukuba.wide.ad.jp
 * epel: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pkgconfig.x86_64 1:0.23-9.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================
 Package                                                   Arch                                                   Version                                                          Repository                                            Size
==============================================================================================================================================================================================================================================
Installing:
 pkgconfig                                                 x86_64                                                 1:0.23-9.1.el6                                                   base                                                  70 k

Transaction Summary
==============================================================================================================================================================================================================================================
Install       1 Package(s)

Total download size: 70 k
Installed size: 137 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: 70 k
pkgconfig-0.23-9.1.el6.x86_64.rpm                                                                                                                                                                                      |  70 kB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : 1:pkgconfig-0.23-9.1.el6.x86_64                                                                                                                                                                                            1/1
  Verifying  : 1:pkgconfig-0.23-9.1.el6.x86_64                                                                                                                                                                                            1/1

Installed:
  pkgconfig.x86_64 1:0.23-9.1.el6

Complete!

入ったので、postgresql インストールをもう一度

# yum install postgresql-server postgresql-devel postgresql-libs --enablerepo=pgdg93 --disablerepo=base
Loaded plugins: fastestmirror, presto
Loading mirror speeds from cached hostfile
 * epel: ftp.tsukuba.wide.ad.jp
 * extras: ftp.tsukuba.wide.ad.jp
 * updates: ftp.tsukuba.wide.ad.jp
Setting up Install Process
Package postgresql93-libs-9.3.5-1PGDG.rhel6.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package postgresql93-devel.x86_64 0:9.3.5-1PGDG.rhel6 will be installed
---> Package postgresql93-server.x86_64 0:9.3.5-1PGDG.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

==============================================================================================================================================================================================================================================
 Package                                                         Arch                                               Version                                                          Repository                                          Size
==============================================================================================================================================================================================================================================
Installing:
 postgresql93-devel                                              x86_64                                             9.3.5-1PGDG.rhel6                                                pgdg93                                             1.5 M
 postgresql93-server                                             x86_64                                             9.3.5-1PGDG.rhel6                                                pgdg93                                             4.1 M

Transaction Summary
==============================================================================================================================================================================================================================================
Install       2 Package(s)

Total download size: 5.5 M
Installed size: 22 M
Is this ok [y/N]: y
Downloading Packages:
Setting up and reading Presto delta metadata
Processing delta metadata
Package(s) data still to download: 5.5 M
(1/2): postgresql93-devel-9.3.5-1PGDG.rhel6.x86_64.rpm                                                                                                                                                                 | 1.5 MB     00:02
(2/2): postgresql93-server-9.3.5-1PGDG.rhel6.x86_64.rpm                                                                                                                                                                | 4.1 MB     00:05
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                                                         618 kB/s | 5.5 MB     00:09
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : postgresql93-server-9.3.5-1PGDG.rhel6.x86_64                                                                                                                                                                               1/2
  Installing : postgresql93-devel-9.3.5-1PGDG.rhel6.x86_64                                                                                                                                                                                2/2
  Verifying  : postgresql93-devel-9.3.5-1PGDG.rhel6.x86_64                                                                                                                                                                                1/2
  Verifying  : postgresql93-server-9.3.5-1PGDG.rhel6.x86_64                                                                                                                                                                               2/2

Installed:
  postgresql93-devel.x86_64 0:9.3.5-1PGDG.rhel6                                                                         postgresql93-server.x86_64 0:9.3.5-1PGDG.rhel6

Complete!

というわけでインストールできました