質問: ### 前提・実現したいこと vagrant、virtual boxにてcentsを立ち上げているのですが、xdebugインストール時に以下のようなエラーが出ており色々調べてみたのですがお手上げ状態です。 pear,php-develのインストールは完了しています。 php5.6です エラーメッセージ [vagrant@localhost ~]$ sudo pecl install xdebug Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: honorsbaseinstall in Role.php on line 180 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: installable in Role.php on line 145 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: phpfile in Role.php on line 212 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Notice: Undefined index: config_vars in Role.php on line 49 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in PEAR/Command.php on line 259 Warning: Invalid argument supplied for foreach() in /usr/share/pear/PEAR/Command.php on line 259 XML Extension not found
回答: peclの問題のようです。xmlを読み込むモジュールが無い場合などに発生するようです。 http://serverfault.com/questions/589877/pecl-command-produces-long-list-of-errors 追記: 問題はPECLの構造によるもので、php.iniに書かれている記述を無視(php -n)してphpを実行するためにコンパイルの時点でxmlモジュールを読み込む設定にしていないとxmlを読み込まず、エラーとなってしまうことがあるとのことです。 peclのスクリプトをいじるという手もありますが、php-xmlをインストールするのが普遍的で簡単な対応方法となっています。(peclがインストールされる度に同じことをしないといけないため) 再追記: ``` vi `which pecl` ``` を実行するとpeclコマンドの内容を確認できるそうです。 そしたら、 その最後の行に ``` exec $PHP -C -n -q $INCARG -d date.timezone=UTC -d output_buffering=1 -d variables_order=EGPCS -d safe_mode=0 -d register_argc_argv="On" $INCDIR/peclcmd.php "$@" ``` とあるので、`$PHP -C`の後にある`-n`を取ってやればいいとのことでした。