composer 安装命令显示 Composer 版本和帮助中心,而不是安装软件包

问题描述 投票:0回答:1

composer 安装命令显示 Composer 版本和帮助中心,而不是安装软件包

我想在本地主机中运行一个 Laravel 项目

首先我添加了环境变量,然后修复了另一个错误。我添加了composer.phar 与 php.exe 一起运行

但最后一个错误composer安装命令继续显示composer的帮助中心和文档

我不知道

看这张照片 在此输入图片描述

这是我的包文件

{
    "name": "loshmis/vanguard",
    "description": "Advanced PHP Login and User Management",
    "keywords": ["advanced", "secure", "login", "user management", "authentication", "authorization", "register"],
    "type": "project",
    "repositories": [],
    "require": {
        "php": "^7.2",
        "anlutro/l4-settings": "^1.0",
        "bacon/bacon-qr-code": "^2.0",
        "barryvdh/laravel-debugbar": "^3.3",
        "coinbase/coinbase-commerce": "^1.0.1",
        "fideloper/proxy": "^4.0",
        "geoip2/geoip2": "^2.11",
        "guzzlehttp/guzzle": "^6.5.5",
        "hexters/coinpayment": "^2.0",
        "intergo/sms.to-laravel-lumen": "^0.0.28",
        "intervention/image": "^2.3",
        "jenssegers/agent": "^2.5",
        "jeremykenedy/laravel-roles": "3.*",
        "laracasts/presenter": "^0.2.1",
        "laravel/framework": "8.x",
        "laravel/legacy-factories": "^1.0",
        "laravel/tinker": "^2.0",
        "laravel/ui": "*",
        "laravelcollective/html": "^6.0",
        "league/fractal": "^0.16.0",
        "mobiledetect/mobiledetectlib": "^2.8",
        "paragonie/random_compat": "~1.4",
        "pragmarx/google2fa-laravel": "^1.4",
        "predis/predis": "^1.1",
        "proengsoft/laravel-jsvalidation": "^4.0",
        "spatie/db-dumper": "^2.21",
        "tymon/jwt-auth": "1.*",
        "yajra/laravel-datatables-oracle": "~9.0"
    },
    "require-dev": {
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^4.1",
        "phpunit/phpunit": "^8.5"
    },
    "autoload": {
        "classmap": [
            "database/seeds",
            "database/factories"
        ],
        "psr-4": {
            "VanguardLTE\\": "app/"
        },
        "files": [
            "app/Support/helpers.php"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": [
            ]
        }
    },
    "scripts": {
        "post-root-package-install": [
            "@php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate"
        ],

        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover"
        ]
    },
    "config": {
        "preferred-install": "dist",
        "sort-packages": true,
        "optimize-autoloader": true
    }
}

我想使用composer install安装包。但它显示帮助中心。无论哪个命令行我都使用同一张图片

php composer-php
1个回答
0
投票

根据您的屏幕截图,您似乎已经安装了作曲家。但你仍然可以使用以下命令来验证它

composer --version

如果您尝试在 Windows 操作系统上安装。我建议您从官方链接

下载

在项目目录中,您还可以尝试运行 composer update 命令以确保所有包均已更新。

© www.soinside.com 2019 - 2024. All rights reserved.