Redmine のアップグレード全手順(1.2.3 → 2.2.2) その4

投稿「Redmine のアップグレード全手順(1.2.3 → 2.2.2) その3」からの続きです。

2.5.セッション管理用秘密鍵の作成

rmagick のインストールまで成功しましたので、bundle install を実行します。

[root ~]# bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Installing rake (10.0.3)
Installing i18n (0.6.1)
Installing multi_json (1.5.0)
Installing activesupport (3.2.11)
Installing builder (3.0.0)
Installing activemodel (3.2.11)
Installing erubis (2.7.0)
Installing journey (1.0.4)
Installing rack (1.4.4)
Installing rack-cache (1.2)
Installing rack-test (0.6.2)
Installing hike (1.2.1)
Installing tilt (1.3.3)
Installing sprockets (2.2.2)
Installing actionpack (3.2.11)
Installing mime-types (1.19)
Installing polyglot (0.3.3)
Installing treetop (1.4.12)
Installing mail (2.4.4)
Installing actionmailer (3.2.11)
Installing arel (3.0.2)
Installing tzinfo (0.3.35)
Installing activerecord (3.2.11)
Installing activeresource (3.2.11)
Using bundler (1.2.3)
Installing coderay (1.0.8)
Installing fastercsv (1.5.5)
Installing rack-ssl (1.3.3)
Installing json (1.7.6) with native extensions
Installing rdoc (3.12)
Installing thor (0.17.0)
Installing railties (3.2.11)
Installing jquery-rails (2.0.3)
Installing metaclass (0.0.1)
Installing mocha (0.12.3)
Installing mysql (2.8.1) with native extensions
Installing net-ldap (0.3.1)
Installing pg (0.14.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/bin/ruby extconf.rb
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/local/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 /var/lib/redmine/bundle/gems/pg-0.14.1 for inspection.
Results logged to /var/lib/redmine/bundle/gems/pg-0.14.1/ext/gem_make.out
An error occurred while installing pg (0.14.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.

しかし、まだ失敗します。

[root ~]# yum install postgresql-devel.x86_64
(略)
Installed:
  postgresql-devel.x86_64 0:8.1.23-6.el5_8

Dependency Installed:
  postgresql.x86_64 0:8.1.23-6.el5_8

Complete!

これで、改めて実行してみます。

[root ~]# bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.11)
Using builder (3.0.0)
Using activemodel (3.2.11)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.4)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.11)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.11)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.11)
Using activeresource (3.2.11)
Using bundler (1.2.3)
Using coderay (1.0.8)
Using fastercsv (1.5.5)
Using rack-ssl (1.3.3)
Using json (1.7.6)
Using rdoc (3.12)
Using thor (0.17.0)
Using railties (3.2.11)
Using jquery-rails (2.0.3)
Using metaclass (0.0.1)
Using mocha (0.12.3)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Installing pg (0.14.1) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /usr/local/bin/ruby extconf.rb
checking for pg_config... yes
Using config values from /usr/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for pg_config_manual.h... yes
checking for PQconnectdb() in -lpq... yes
checking for PQconnectionUsedPassword()... no
Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database.
*** 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/local/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
        --with-pqlib
        --without-pqlib


Gem files will remain installed in /var/lib/redmine/bundle/gems/pg-0.14.1 for inspection.
Results logged to /var/lib/redmine/bundle/gems/pg-0.14.1/ext/gem_make.out
An error occurred while installing pg (0.14.1), and Bundler cannot continue.
Make sure that `gem install pg -v '0.14.1'` succeeds before bundling.

また新たなところで失敗します。
「Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database.」ということです。
今インストールしたpostgresqlおよびpostgresql-develをアンインストールします。

[root ~]# yum erase postgresql.x86_64
(略)
Removed:
  postgresql.x86_64 0:8.1.23-6.el5_8

Dependency Removed:
  postgresql-devel.x86_64 0:8.1.23-6.el5_8

Complete!

postgresqlおよびpostgresql-develの8.4バージョンをインストールしてみます。

[root ~]# yum install postgresql84-devel.x86_64
(略)
Installed:
  postgresql84-devel.x86_64 0:8.4.13-1.el5_8

Dependency Installed:
  postgresql84.x86_64 0:8.4.13-1.el5_8
  postgresql84-libs.x86_64 0:8.4.13-1.el5_8

Complete!

これで、改めて実行してみます。

[root ~]# bundle install
Fetching gem metadata from http://rubygems.org/.........
Fetching gem metadata from http://rubygems.org/..
Using rake (10.0.3)
Using i18n (0.6.1)
Using multi_json (1.5.0)
Using activesupport (3.2.11)
Using builder (3.0.0)
Using activemodel (3.2.11)
Using erubis (2.7.0)
Using journey (1.0.4)
Using rack (1.4.4)
Using rack-cache (1.2)
Using rack-test (0.6.2)
Using hike (1.2.1)
Using tilt (1.3.3)
Using sprockets (2.2.2)
Using actionpack (3.2.11)
Using mime-types (1.19)
Using polyglot (0.3.3)
Using treetop (1.4.12)
Using mail (2.4.4)
Using actionmailer (3.2.11)
Using arel (3.0.2)
Using tzinfo (0.3.35)
Using activerecord (3.2.11)
Using activeresource (3.2.11)
Using bundler (1.2.3)
Using coderay (1.0.8)
Using fastercsv (1.5.5)
Using rack-ssl (1.3.3)
Using json (1.7.6)
Using rdoc (3.12)
Using thor (0.17.0)
Using railties (3.2.11)
Using jquery-rails (2.0.3)
Using metaclass (0.0.1)
Using mocha (0.12.3)
Using mysql (2.8.1)
Using net-ldap (0.3.1)
Installing pg (0.14.1) with native extensions
Installing ruby-openid (2.1.8)
Installing rack-openid (1.3.1)
Installing rails (3.2.11)
Installing rmagick (2.13.1) with native extensions
Installing shoulda (2.11.3)
Installing sqlite3 (1.3.7) with native extensions
Installing yard (0.8.3)
Your bundle is complete! It was installed into ./bundle

やっと成功しました。
この先は次の投稿「Redmine のアップグレード全手順(1.2.3 → 2.2.2) その5」で。

Comments are closed.