スポンサーサイト
上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。
新しい記事を書く事で広告が消せます。
DBD-Pgをインストール
RHEL ES4 Update3 x86_64での話。
DBI + DBD-PgでPostgresに接続したくなった。
DBIは既にインストール済みだったからDBD-Pgをインストール
↓
# gem install dbd-pg
でもエラー
↓
Postgres関連のパッケージが足りないっぽい。
とりあえず現状何がインストールされているか確認
↓
# rpm -qa | grep postgres
postgresql-libs-7.4.8-1.RHEL4.1
古い。まずはこれをアップデート(RPMはRHNからダウンロード)
↓
# rpm -Uvh postgresql-libs-7.4.30-1.el4_8.2.x86_64.rpm
あと必要と思われるRPMをインストール(同じくRPMはRHNからダウンロード)
↓
# rpm -ivh postgresql-7.4.30-1.el4_8.2.x86_64.rpm postgresql-devel-7.4.30-1.el4_8.2.x86_64.rpm
DBD-Pgのインストール再チャレンジ
↓
# gem install dbd-pg
Building native extensions. This could take a while...
Successfully installed pg-0.11.0
Successfully installed dbd-pg-0.3.9
2 gems installed
Installing ri documentation for dbd-pg-0.3.9...
Installing RDoc documentation for dbd-pg-0.3.9...
うまくいった。
DBI + DBD-PgでPostgresに接続したくなった。
DBIは既にインストール済みだったからDBD-Pgをインストール
↓
# gem install dbd-pg
でもエラー
↓
Building native extensions. This could take a while...
ERROR: Error installing dbd-pg:
ERROR: Failed to build gem native extension.
/usr/bin/ruby extconf.rb install dbd-pg
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/usr/bin/ruby
--with-pg
--without-pg
--with-pg-dir
--without-pg-dir
--with-pg-include
--without-pg-include=${pg-dir}/include
--with-pg-lib
--without-pg-lib=${pg-dir}/lib
--with-pg-config
--without-pg-config
--with-pg_config
--without-pg_config
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/pg-0.11.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/pg-0.11.0/ext/gem_make.out
Postgres関連のパッケージが足りないっぽい。
とりあえず現状何がインストールされているか確認
↓
# rpm -qa | grep postgres
postgresql-libs-7.4.8-1.RHEL4.1
古い。まずはこれをアップデート(RPMはRHNからダウンロード)
↓
# rpm -Uvh postgresql-libs-7.4.30-1.el4_8.2.x86_64.rpm
あと必要と思われるRPMをインストール(同じくRPMはRHNからダウンロード)
↓
# rpm -ivh postgresql-7.4.30-1.el4_8.2.x86_64.rpm postgresql-devel-7.4.30-1.el4_8.2.x86_64.rpm
DBD-Pgのインストール再チャレンジ
↓
# gem install dbd-pg
Building native extensions. This could take a while...
Successfully installed pg-0.11.0
Successfully installed dbd-pg-0.3.9
2 gems installed
Installing ri documentation for dbd-pg-0.3.9...
Installing RDoc documentation for dbd-pg-0.3.9...
うまくいった。
スポンサーサイト