[英]composer get installation error for phpseclib
I am trying to install phpseclib in Laravel for RSA.我正在尝试在 Laravel 中为 RSA 安装 phpseclib。 I have tried following command.
我试过以下命令。
composer require phpseclib/phpseclib
But I do get following error.但我确实收到以下错误。
Using version ^2.0 for phpseclib/phpseclib./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages.对 phpseclib/phpseclib./composer.json 使用版本 ^2.0 已更新 使用 package 信息加载作曲家存储库 更新依赖项(包括 require-dev) 您的要求无法解析为可安装的软件包集。
Problem 1问题 1
Problem 2问题 2
Installation failed, reverting./composer.json to its original content.安装失败,正在将 ./composer.json 还原为其原始内容。
Given below is the content of composer.json file.下面给出的是 composer.json 文件的内容。
"name": "laravel/laravel",
"type": "project",
"version": "v1.2.0",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2",
"ext-json": "*",
"berkayk/onesignal-laravel": "^1.0",
"doctrine/dbal": "~2.3",
"egulias/email-validator": "^2.1",
"fideloper/proxy": "^4.0",
"infyomlabs/coreui-templates": "6.0.x-dev",
"infyomlabs/laravel-generator": "6.0.x-dev",
"intervention/image": "^2.5",
"laminas/laminas-diactoros": "^2.2",
"laravel/framework": "^6.0",
"laravel/passport": "^7.5",
"laravel/socialite": "^4.3",
"laravel/telescope": "^2.1",
"laravel/tinker": "^1.0",
"laravelcollective/html": "^6.0",
"league/flysystem-aws-s3-v3": "^1.0",
"phpseclib/phpseclib": "^2.0",
"pusher/pusher-php-server": "~4.0",
"spatie/laravel-analytics": "^3.9",
"spatie/laravel-permission": "^3.2",
"symfony/translation": "4.3.8",
"yajra/laravel-datatables-oracle": "~9.0"
},
"require-dev": {
"barryvdh/laravel-debugbar": "^3.2",
"barryvdh/laravel-ide-helper": "^2.6",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^8.0"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"files": ["app/helpers.php"],
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
I have tried for couple of hours to search solution on google and stack overflow but didn't get any success.我已经尝试了几个小时在谷歌和堆栈溢出上搜索解决方案,但没有取得任何成功。
Are you sure the given error message is related to phpseclib/phpseclib
?您确定给定的错误消息与
phpseclib/phpseclib
有关吗? That package does not use any Symfony dependencies. package 不使用任何 Symfony 依赖项。 And, according to the dependency list of
laravel/passport
, that library is already installed.并且,根据
laravel/passport
的依赖列表,该库已经安装。
I would assume that you have installed another package in the meantime by adding it to composer.json
manually.我假设您同时通过手动将其添加到
composer.json
安装了另一个 package。 What happens if you call composer install
- does it inform you that the installation is not possible, or that the lock file is out of sync?如果您调用
composer install
会发生什么 - 它是否通知您无法安装,或者锁定文件不同步?
You could resolve this by removing symfony/translation
from your composer.json
, run composer update
, and try to reinstall this package afterwards.您可以通过从
composer.json
中删除symfony/translation
来解决此问题,运行composer update
,然后尝试重新安装此 package 。 Because somehow symfony/translation-contracts
got installed in v2.0.1 (which is only compatible with Symfony 4.4 or later), while your configuration explicitly tries to load symfony/translation
from Symfony 4.3因为
symfony/translation-contracts
以某种方式安装在 v2.0.1 中(仅与 Symfony 4.4 或更高版本兼容),而您的配置显式尝试从 Symfony 4.3 加载symfony/translation
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.