【问题标题】:How to install phpDocumentor with pear on cygwin如何在cygwin上用pear安装phpDocumentor
【发布时间】:2020-02-21 09:35:13
【问题描述】:

我看到了:Installing phpDocumentor using PEAR (2013) 而且我使用了官方文档:https://docs.phpdoc.org/latest/getting-started/installing.html 我试试这个问题:https://github.com/phpDocumentor/phpDocumentor/issues/2113

来自文档:

当我尝试时:

1 | pear channel-discover pear.phpdoc.org
2 | pear install phpdoc/phpDocumentor

结果:

1 | Channel "pear.phpdoc.org" is already initialized
2 | No releases available for package "pear.phpdoc.org/phpDocumentor"
2 | install failed

来自问题:

让我们试试问题:

1 | wget https://pear.phpdoc.org/channel.xml
2 | pear channel-update ./channel.xml
3 | pear install http://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz

结果:

1 | 200 OK
1 | « channel.xml.1 » saved
2 | Update of Channel "pear.phpdoc.org" succeeded
3 | phpDocumentor-2.9.0.tgz
3 | Could not download from "http://pear.phpdoc.org/get/phpDocumentor-2.9.0.tgz" (File
3 | http://pear.phpdoc.org:80/get/phpDocumentor-2.9.0.tgz not valid (received: HTTP/1.1 308 Permanent 3 3 | Redirect))
3 | Invalid or missing remote package file
3 | install failed

【问题讨论】:

    标签: windows cmd installation command cygwin


    【解决方案1】:

    我在这里找到了解决方案:Windows - PHPDocs unable to install through Pear

    所以我们需要将包解压到一个临时目录,如果你愿意,可以将它命名为 uncompressedpackagedir。在 uncompressedpackagedir 中,您将看到一个 package.xml,您需要将其复制或移动到以您提取的包命名的新创建目录中。对于 phpDocumentor v2.8.2,它将被命名为 phpDocumentor-2.8.2。 cd 进入该目录并执行“$ sudo pear installl package.xml

    但是当我运行 phpdoc --version 我得到一个错误(require_once 致命错误:无法打开流,说没有这样的文件或目录...Bootstrap.php)

    所以我放弃 pear 并使用 .phar 安装,如 github 上的文档所述:https://github.com/phpDocumentor/phpDocumentor#using-the-phar

    【讨论】:

      猜你喜欢
      • 2013-12-29
      • 2013-12-09
      • 2021-11-10
      • 2013-04-06
      • 2011-05-24
      • 2015-03-26
      • 2011-04-08
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多