这是我对pear的配置,在执行php命令时,我会得到这个错误。我的php -v是PHP5.6.30 (cli) (构建时间:2017年2月7日16:18:37)
phpdoc --filename first-doc.php -t docs
PHP Warning: require(PhpDocumentor/phpDocumentor/phpdoc.inc): failed to open stream: No such file or directory in /usr/local/bin/phpdoc on line 40
PHP Fatal error: require(): Failed opening required 'PhpDocumentor/phpDocumentor/phpdoc.inc' (include_path='.:') in /usr/local/bin/phpdoc on line 40

请帮帮忙
发布于 2017-07-17 20:05:56
至少,PHP配置的include_path不包含主要的PEAR php_dir位置。
注意,错误消息显示(include_path='.:'),这意味着它只包含当前位于shell中的目录。
PEAR配置显示php_dir设置为/usr/lib/php,因此需要将其添加到php.ini文件中的include_path设置中。
实际上,如果没有正确的include_path设置,PEAR会成功地安装任何东西,这让我感到惊讶,因为PEAR程序本身在运行时会遇到问题。也许include_path在安装之后被错误地配置了。
https://stackoverflow.com/questions/44352388
复制相似问题