LoginSignup
3

More than 5 years have passed since last update.

PHP5.3 系で PEAR の DB ライブラリのインストール

Posted at

概要

PHP5.3 系で PEAR DB インストールの際にエラーが出たので対応メモ。

対応内容

インストールコマンド

# pear install DB

エラー内容

WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
Failed to download pear/PEAR, latest release is version 1.10.0, but it requires PHP version "5.4.0", use "channel://pear.php.net/PEAR-1.10.0" to install
pear/DB requires package "pear/PEAR" (version >= 1.10.0), installed version is 1.9.5
No valid packages found
install failed

PHP5.4.0 以上が必要らしいが、上げれない環境だったので、PEAR DB のバージョンを下げてインストールする。

PEAR DB インストール

1.9.1

# pear install DB-1.9.1
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
Failed to download pear/PEAR, latest release is version 1.10.0, but it requires PHP version "5.4.0", use "channel://pear.php.net/PEAR-1.10.0" to install
pear/DB requires package "pear/PEAR" (version >= 1.10.0), installed version is 1.9.5
No valid packages found
install failed

1.9.1 も PHP5.4.0 以上が必要らしい

1.9.0

# pear install DB-1.9.0
WARNING: "pear/DB" is deprecated in favor of "pear/MDB2"
downloading DB-1.9.0.tgz ...
Starting to download DB-1.9.0.tgz (134,174 bytes)
.............................done: 134,174 bytes
install ok: channel://pear.php.net/DB-1.9.0

インストールOK

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3