PEARを再インストールしました。
PEARをシステムレベルでインストールせず、各アプリケーション毎にインストールするようにしてます。
再インストール手順
go-pearのバージョンによっては、デフォルトのインストール場所等が異なります。
1. http://go-pear.org/にアクセスして表示される内容を保存。
「保存するファイル名「go-pear.php」とします。」
2. go-pearを実行してインストール。
PATHディレクトリ内にインストールするようにします。
$ php -c php4go-pear.ini -Cq go-pear.php
PHP Strict Standards: Assigning the return value of new by reference is deprecated in /PATH/lib/pear/bin/go-pear.php on line 770
Welcome to go-pear!
Go-pear will install the 'pear' command and all the files needed by
it. This command is your tool for PEAR installation and maintenance.
Go-pear also lets you download and install the following optional PEAR
packages: PEAR_Frontend_Web-beta, PEAR_Frontend_Gtk2, MDB2.
If you wish to abort, press Control-C now, or press Enter to continue:
HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none::
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
1. Installation prefix ($prefix) : /PATH/lib/pear/bin
2. Temporary files directory : $prefix/temp
3. Binaries directory : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/PEAR
5. Documentation base directory : $php_dir/docs
6. Data base directory : $php_dir/data
7. Tests base directory : $php_dir/tests
1-7, 'all' or Enter to continue: 1
Installation prefix ($prefix) [/PATH/lib/pear/bin] : /PATH/lib/pear
Below is a suggested file layout for your new PEAR installation. To
change individual locations, type the number in front of the
directory. Type 'all' to change all of them or simply press Enter to
accept these locations.
1. Installation prefix ($prefix) : /PATH/lib/pear
2. Temporary files directory : $prefix/temp
3. Binaries directory : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/PEAR
5. Documentation base directory : $php_dir/docs
6. Data base directory : $php_dir/data
7. Tests base directory : $php_dir/tests
1-7, 'all' or Enter to continue:
The following PEAR packages are bundled with PHP: PEAR_Frontend_Web-beta,
PEAR_Frontend_Gtk2, MDB2.
Would you like to install these as well? [Y/n] : Y
Loading zlib: ok
Bootstrapping Installer...................
Using previously install ... ok
Extracting installer..................
Using previously installed installer ... ok
Preparing installer..................
Updating channel "pear.php.net"
Channel "pear.php.net" is up to date
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
Installing selected packages..................
Package: PEAR-stable.............................. already installed ... ok
Package: Structures_Graph-stable.................. already installed ... ok
Package: Archive_Tar-stable....................... already installed ... ok
Package: Console_Getopt-stable.................... already installed ... ok
Downloading and installing package: PEAR_Frontend_Web-beta.......downloading PEAR_Frontend_Web-0.7.1.tgz ...
Starting to download PEAR_Frontend_Web-0.7.1.tgz (52,321 bytes)
.............done: 52,321 bytes
install ok: channel://pear.php.net/PEAR_Frontend_Web-0.7.1
Downloading and installing package: PEAR_Frontend_Gtk2.......Did not download optional dependencies: pear/XML_Parser, pear/XML_Util, use --alldeps to download automatically
Did not download dependencies: pear/System_Command, use --alldeps or --onlyreqdeps to download automatically
pear/PEAR_Frontend_Gtk2 requires PHP extension "php-gtk" (version >= 2.0.0dev)
pear/Config can optionally use package "pear/XML_Parser"
pear/Config can optionally use package "pear/XML_Util"
pear/Gtk2_EntryDialog requires PHP extension "php-gtk" (version >= 2.0.0dev)
pear/Gtk2_FileDrop requires PHP extension "php-gtk" (version >= 2.0.0dev)
pear/MIME_Type can optionally use package "pear/System_Command"
downloading Config-1.10.11.tgz ...
Starting to download Config-1.10.11.tgz (27,718 bytes)
...done: 27,718 bytes
downloading MIME_Type-1.0.0.tgz ...
Starting to download MIME_Type-1.0.0.tgz (4,404 bytes)
...done: 4,404 bytes
install ok: channel://pear.php.net/Config-1.10.11
install ok: channel://pear.php.net/MIME_Type-1.0.0
Downloading and installing package: MDB2.............downloading MDB2-2.4.1.tgz ...
Starting to download MDB2-2.4.1.tgz (119,790 bytes)
...done: 119,790 bytes
install ok: channel://pear.php.net/MDB2-2.4.1
MDB2: Optional feature fbsql available (Frontbase SQL driver for MDB2)
MDB2: Optional feature ibase available (Interbase/Firebird driver for MDB2)
MDB2: Optional feature mysql available (MySQL driver for MDB2)
MDB2: Optional feature mysqli available (MySQLi driver for MDB2)
MDB2: Optional feature mssql available (MS SQL Server driver for MDB2)
MDB2: Optional feature oci8 available (Oracle driver for MDB2)
MDB2: Optional feature pgsql available (PostgreSQL driver for MDB2)
MDB2: Optional feature querysim available (Querysim driver for MDB2)
MDB2: Optional feature sqlite available (SQLite2 driver for MDB2)
MDB2: To install optional features use "pear install pear/MDB2#featurename"
******************************************************************************
WARNING! The include_path defined in the currently used php.ini does not
contain the PEAR PHP directory you just specified:
</PATH/lib/pear/PEAR>
If the specified directory is also not in the include_path used by
your scripts, you will have problems getting any PEAR packages working.
Would you like to alter php.ini </PATH/lib/pear/bin/php4go-pear.ini>? [Y/n] : n
I will add a workaround for this in the 'pear' command to make sure
the installer works, but please look over your php.ini or Apache
configuration to make sure /PATH/lib/pear/PEAR is in your include_path.
Current include path : .:
Configured directory : /PATH/lib/pear/PEAR
Currently used php.ini (guess) : /PATH/lib/pear/bin/php4go-pear.ini
Press Enter to continue:
The 'pear' command is now at your service at /PATH/lib/pear/bin/pear
** The 'pear' command is not currently in your PATH, so you need to
** use '/PATH/lib/pear/bin/pear' until you have added
** '/PATH/lib/pear/bin' to your PATH environment variable.
Run it without parameters to see the available actions, try 'pear list'
to see what packages are installed, or 'pear help' for help.
For more information about PEAR, see:
http://pear.php.net/faq.php
http://cvs.php.net/co.php/pearweb/doc/pear_package_manager.txt?p=1
http://pear.php.net/manual/
Thanks for using go-pear!
インストール時のエラー対処
最初、次のようなエラーとなり、インストールに失敗しました。
PHP Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 4104 bytes) in PATH/pear/temp/PEAR/Registry.php on line 747
1.まず、php.iniをコピー。
$ cp /etc/php.ini php4go-pear.ini
2.コピーしたphp.ini(php4go-pear.ini)を編集。
;memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
memory_limit = 128M
3.go-pear実行
$ php -c php4go-pear.ini -Cq go-pear.php