在作曲家中安装独白的异常

Exception installing monolog in composer

我试图在我的 Ubuntu 上使用 composer composer require monolog/monolog 安装 monolog/monolog,但我遇到了这个错误:

Installation failed, reverting ./composer.json to its original content.


  [RuntimeException]
  pathToMyProject/vendor/psr/log does not exist and could not be created.

有人知道问题出在哪里吗?

好吧我的错你只需要 运行 有 sudo :p