【问题标题】:PHPDoc on OSX via PEAR通过 PEAR 在 OSX 上使用 PHPDoc
【发布时间】: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 命令。

任何帮助将不胜感激。

谢谢!

【问题讨论】:

  • 请将您的解决方案转换为答案。

标签: pear phpdoc


【解决方案1】:

当我找到解决方案时,我正要放弃。

OS X 使用的是 PHP 5.3,所以我手动将其更新为 5.4.10。

然后,我重新安装了PEAR,然后重新安装了apigen,然后重新安装了phpdoc,一切正常。

要在我的系统上更新 PHP,我遵循以下步骤: http://mac.tutsplus.com/tutorials/server/upgrading-the-native-php-installation-on-os-x-mountain-lion/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-01-18
    • 2014-10-11
    • 1970-01-01
    • 2012-02-29
    • 1970-01-01
    • 2011-09-10
    • 2010-11-07
    • 1970-01-01
    相关资源
    最近更新 更多