RuntimeException 供应商不存在且无法创建 [英] RuntimeException vendor does not exist and could not be created

查看:21
本文介绍了RuntimeException 供应商不存在且无法创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试过在网上找到的其他帖子,但似乎没有一个可以正常工作.我正在使用 这个.我找到了它的根源,即 /var/www/.然后我执行 composer install 并且我有一个 composer.json 文件.我明白了

I've tried other posts I found online but none seemed to work correctly. I'm working with this. And I make my way to the root of it, which is /var/www/. So then I do composer install and I have a composer.json file in there. I get

[RuntimeException]                               
vendor does not exist and could not be created.

这是文件

{
    "name": "panique/php-login",
    "type": "project",
    "description": "A PHP login system embedded in a simple MVC framework",
    "keywords": ["login", "auth", "user", "authentification", "mvc"],
    "homepage": "https://github.com/panique/php-login",
    "license": "MIT",
    "authors": [
        {
            "name": "Panique",
            "homepage": "http://careers.stackoverflow.com/panique",
            "role": "Developer"
        }
    ],
    "support": {
        "issues": "https://github.com/panique/php-login/issues",
        "source": "https://github.com/panique/php-login"
    },
    "require":{
        "php": ">=5.3.7",
        "ircmaxell/password-compat": "1.0.*",
        "phpmailer/phpmailer": "5.2.*",
        "gregwar/captcha": "dev-master",
        "facebook/php-sdk": "@stable",
        "raveren/kint": "dev-1.0.0-wip"
    }
}

我真的不知道从这里去哪里......

I'm not really sure where to go from here....

推荐答案

Google 员工,不要将 composer 与 sudo 一起使用:

Googlers, do not use composer with sudo:

将您的用户添加到 www-data 组(此操作需要您注销并重新登录)

Add your user in the www-data group (this action require you to logout and login again)

sudo usermod -a -G www-data `whoami`

授予/var/www 正确的权限

Give the right permissions to /var/www

sudo chown root:root /var/www
sudo chmod 755 /var/www/

将这些权限授予您的项目

Give these permissions to your project

sudo chown -R www-data:www-data /var/www/<project>
sudo chmod -R 774 /var/www/<project>

这篇关于RuntimeException 供应商不存在且无法创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆