【发布时间】:2012-12-20 19:41:40
【问题描述】:
我正在运行 OS 10.8.2 (Mountain Lion)。
正如此博客所述,我重新安装了 PEAR:
http://clickontyler.com/blog/2008/01/how-to-install-pear-in-mac-os-x-leopard/
所以我将php.ini 文件中的include_path 设置为/usr/local/share/pear。然后我通过 pear 安装了 apigen,一切正常。然后我想安装phpdoc,但是安装后出现以下错误:
PHP Warning: require(/usr/lib/php/pear/phpDocumentor/src/phpDocumentor/Bootstrap.php): failed to open stream: No such file or directory in /usr/bin/phpdoc on line 33
PHP Fatal error: require(): Failed opening required '/usr/lib/php/pear/phpDocumentor/src/phpDocumentor/Bootstrap.php' (include_path='.:/usr/local/share/pear') in /usr/bin/phpdoc on line 33
在 SO 上搜索后,我发现了这个 QA: PhpDocumentor installed via PEAR on OSX not working - missing files?
所以,当我执行pear config-show 时,它表明我的php_dir 设置为/usr/local/share/pear,这正是我在php.ini 中设置的内容
但是,phpdoc 似乎仍在尝试使用/usr/lib/php/pear 作为目录。
/usr/lib/php/pear 文件夹不存在!因此,如果我将 pear 配置更改为该文件夹,它会破坏我安装的其他 pear 命令。
任何帮助将不胜感激。
谢谢!
【问题讨论】:
-
请将您的解决方案转换为答案。