KAKIMASSE

ネットで見つけた面白い記事や、役立つのではと感じたネタなどを書いています。

PEARで HTTP error, got response: HTTP/1.1 404 Not Found...と表示されるときの対処方法2

      2011/01/12

以前書いた
PEARで HTTP error, got response: HTTP/1.1 404 Not Found...と表示されるときの対処方法
ですが、最近のCentOS(4.6)でも同様の現象があり、
同じようにPEARを再インストールしたところ途中で下記のようなメッセージが出て今度は上手く行きませんでした。

[root@localhost ~]# wget --proxy=off -O - -q http://pear.php.net/go-pear | php
Content-type: text/html; charset=Shift_JIS
X-Powered-By: PHP/4.3.9
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: そのままEnter
HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:: そのままEnter
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と4の設定がいつものものではなくなっているので変更
1. Installation prefix ($prefix) : .
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 1を/usr に修正
Installation prefix ($prefix) [.] : /usr
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) : /usr
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: 4 4を$prefix/share/pear に修正
PHP code directory ($php_dir) [$prefix/PEAR] : $prefix/share/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) : /usr
2. Temporary files directory : $prefix/temp
3. Binaries directory : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/share/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: そのままEnter
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 Yを選択
Loading zlib: ok
Bootstrapping Installer...................
Using previously install ... ok
Extracting installer..................
Downloading package: PEAR.............PHP Fatal error: Cannot instantiate non-existent class: archive_tar in - on line 725

エラーメッセージの内容で調べてみるとPEAR Forumで同様の事例がHIT(英語&ユーザはwindows環境でしたが)
http://pear-forum.org/topic1875.html
最後に書いてある事を簡単に訳すと 『 /php/pearフォルダ を削除してもう一回やったらうまくいったよ!』
的な内容だと思われるので同じような事をしてみました。

/usr/share/pear 一応バックアップ
[root@localhost ~]# mv /usr/share/pear /usr/share/pear_bak

再度実行
[root@localhost ~]# wget --proxy=off -O - -q http://pear.php.net/go-pear | php

Content-type: text/html; charset=Shift_JIS
X-Powered-By: PHP/4.3.9
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: そのままEnter
HTTP proxy (http://user:password@proxy.myhost.com:port), or Enter for none:: そのままEnter
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と4の設定がいつものものではなくなっているので変更
1. Installation prefix ($prefix) : .
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 1を/usr に修正
Installation prefix ($prefix) [.] : /usr
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) : /usr
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: 4 4を$prefix/share/pear に修正
PHP code directory ($php_dir) [$prefix/PEAR] : $prefix/share/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) : /usr
2. Temporary files directory : $prefix/temp
3. Binaries directory : $prefix/bin
4. PHP code directory ($php_dir) : $prefix/share/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: そのままEnter
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 そのままEnter
Loading zlib: ok
Bootstrapping Installer...................
Bootstrapping PEAR.php............(remote) ok
Bootstrapping Archive/Tar.php............(remote) ok
Bootstrapping Console/Getopt.php............(remote) ok
Extracting installer..................
Downloading package: PEAR.............ok
Downloading package: Structures_Graph....ok
Preparing installer..................
Updating channel "pear.php.net"
Update of Channel "pear.php.net" succeeded
Updating channel "pecl.php.net"
Update of Channel "pecl.php.net" succeeded
Installing selected packages..................
Downloading and installing package: PEAR.............warning: pear/PEAR requires package "pear/Archive_Tar" (recommended version 1.3.2)
warning: pear/PEAR requires package "pear/Structures_Graph" (recommended version 1.0.2)
warning: pear/PEAR requires package "pear/Console_Getopt" (recommended version 1.2.3)
pear/PEAR can optionally use package "pear/XML_RPC" (version >= 1.4.0)
downloading PEAR-1.7.1.tgz ...
Starting to download PEAR-1.7.1.tgz (302,377 bytes)
.....................................done: 302,377 bytes
install ok: channel://pear.php.net/PEAR-1.7.1
PEAR: Optional feature webinstaller available (PEAR's web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR's PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR's PHP-GTK2-based installer)
PEAR: To install optional features use "pear install pear/PEAR#featurename"
Installing bootstrap package: Structures_Graph.......install ok: channel://pear.php.net/Structures_Graph-1.0.2
Downloading and installing package: Archive_Tar-stable.......downloading Archive_Tar-1.3.2.tgz ...
Starting to download Archive_Tar-1.3.2.tgz (17,150 bytes)
...done: 17,150 bytes
install ok: channel://pear.php.net/Archive_Tar-1.3.2
Downloading and installing package: Console_Getopt-stable.......downloading Console_Getopt-1.2.3.tgz ...
Starting to download Console_Getopt-1.2.3.tgz (4,011 bytes)
...done: 4,011 bytes
install ok: channel://pear.php.net/Console_Getopt-1.2.3
Downloading and installing package: PEAR_Frontend_Web-beta.......downloading PEAR_Frontend_Web-0.7.2.tgz ...
Starting to download PEAR_Frontend_Web-0.7.2.tgz (52,876 bytes)
...done: 52,876 bytes
downloading HTML_Template_IT-1.2.1.tgz ...
Starting to download HTML_Template_IT-1.2.1.tgz (21,565 bytes)
...done: 21,565 bytes
install ok: channel://pear.php.net/HTML_Template_IT-1.2.1
install ok: channel://pear.php.net/PEAR_Frontend_Web-0.7.2
Downloading and installing package: PEAR_Frontend_Gtk2.......Failed to download pear/PEAR_Frontend_Gtk2, latest release is version 1.0.0, but it requires PHP version "5.1", use "channel://pear.php.net/PEAR_Frontend_Gtk2-1.0.0" to install
Cannot initialize 'channel://pear.php.net/PEAR_Frontend_Gtk2', invalid or missing package file
Package "channel://pear.php.net/PEAR_Frontend_Gtk2" is not valid
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"
The 'pear' command is now at your service at /usr/bin/pear

これで上手く行きました。
PEARのライブラリインストールも大丈夫です。

[root@localhost ~]# pear install -a Mail
downloading Mail-1.1.14.tgz ...
Starting to download Mail-1.1.14.tgz (17,537 bytes)
......done: 17,537 bytes
downloading Net_SMTP-1.2.11.tgz ...
Starting to download Net_SMTP-1.2.11.tgz (10,385 bytes)
...done: 10,385 bytes
downloading Net_Socket-1.0.8.tgz ...
Starting to download Net_Socket-1.0.8.tgz (5,441 bytes)
...done: 5,441 bytes
downloading Auth_SASL-1.0.2.tgz ...
Starting to download Auth_SASL-1.0.2.tgz (5,645 bytes)
...done: 5,645 bytes
install ok: channel://pear.php.net/Mail-1.1.14
install ok: channel://pear.php.net/Net_Socket-1.0.8
install ok: channel://pear.php.net/Auth_SASL-1.0.2
install ok: channel://pear.php.net/Net_SMTP-1.2.11

同様の事例がgoogleであまりHITしないのでPEARでハマってるのは私だけ´д`)?
とか思ってしまいますがまぁ参考までに。

 - サーバ環境

SPONSORD LINKS

スポンサーリンク

スポンサーリンク

Message

メールアドレスが公開されることはありません。

  関連記事

androidのConnectBotにpoderosaの秘密鍵をインポートしてスマホからSSH接続する方法

photo credit: johncatral via photopin cc ...

no image
Linux:postfixで送信されずに残っているメールキューを削除したい。

CentOS4.5でpostfixを使用している環境で 毎日メールサーバから送ら ...

Uhhuh. NMI received for unknown reason 20 on CPU 0. Do you havea a strange power saving mode enabled? と表示された時の対処方法

使っているサーバ(Dell Power Edge sc440)に突然アクセスでき ...

au携帯動画再生エラー
FFmpegで変換した3g2動画をau(ezweb)の携帯(ガラケー)で動画再生時に「再生できません(再生不可データ)」と表示されるエラーの対応方法

FFmpegで変換した3g2動画をauのガラケーで再生すると、 上の画像のエラー ...

no image
Linuxコマンド:ファイルの中身を空にしたい

膨大になったログファイルとかいちいち削除して作成してどーのこーのするの面倒だなー ...

no image
ネットワークネタ:サーバ1台に複数のIPアドレスを割り当てたい

題記の通り、複数固定IPアドレスなどを取得した場合、 別にIPアドレス毎にサーバ ...

no image
CentOS:ネットワーク関係が何故かカーネルパニックでフリーズしてしまう。

昨日からずーっとこれでハマってました (泣 現象は ・ADSLに接続するとフリー ...

no image
PEARで HTTP error, got response: HTTP/1.1 404 Not Found...と表示されるときの対処方法 

※2008/4/24追記 下記の手順では上手くいかない事がありました。 その場合 ...

no image
CentOS:サーバ起動時に特定のサービスで止まってしまう時の対処(シングルユーザモード)

CentOSのサーバで起動時に各サービスの起動をしている中で一つのサービスのとこ ...