1. Error screenshot
2. Delete composer.lock
3. Execute orders
composer clearcache
Clear cache
4. Update dependency
composer update
(regenerate) composer.lock
)
5. You can execute the required commands
1. Error screenshot
2. Delete composer.lock
3. Execute orders
composer clearcache
Clear cache
4. Update dependency
composer update
(regenerate) composer.lock
)
5. You can execute the required commands
install
report errors
The solution is to install through the native composer
composer require tinywan/webman-permission
[Composer\Downloader\TransportException]
The "http://packagist.org/packages.json" file could not be downloaded: failed to open stream: HTTP request failed!
create-project [-s|--stability="..."] [--prefer-source] [--prefer-dist] [--repository-url="..."] [--dev] [--no-dev] [--n
o-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--keep-vcs] [--no-install] [--ignore-platform-reqs]
[package] [directory] [version]
The solution is to disable the HTTPS request and use HTTP instead. So we set a local or global composer configuration config in the composer. JSON file
Method 1: command line composer config secure http false. Through the command to modify composer. JSON, the effect is the same as method 2
Method 2: change composer.json directly and add “secure http”: false to “config”
"config" : {
"vendor-dir" : "packages",
"secure-http": false
}
composer config -l -g
composer config -g repo.packagist composer
composer config -g --unset repos.packagist
Website content quality is poor, distribution efficiency is too low how to do?Huawei engineers offer 5 unique skills>>>
root@test2:/work/usrc$ composer require qcloud/cos-sdk-v5
./composer.json has been updated
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option
Loading composer repositories with package information
Updating dependencies (including require-dev)
Killed
Most of the reasons are caused by insufficient cache, which can be solved by adding cache in Linux environment
free -m
mkdir -p /var/_swap_
cd /var/_swap_
dd if=/dev/zero of=swapfile bs=1M count=2000
mkswap swapfile
swapon swapfile
echo “/var/_swap_/swapfile none swap sw 0 0” >> /etc/fstab
free -m
Today, I want to install workerman on TP5 to realize a background message reminder function
The first step is stuck. According to the manual, install through composer first
$ composer require topthink/think-worker
Result report error
$ composer require topthink/think-worker
Using version ^2.0 for topthink/think-worker
./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.
Problem 1
- topthink/think-worker v2.0.5 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
- topthink/think-worker v2.0.4 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
- topthink/think-worker v2.0.3 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
- topthink/think-worker v2.0.2 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
- topthink/think-worker v2.0.1 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
- topthink/think-worker v2.0.0 requires topthink/framework 5.1.* -> satisfiable by topthink/framework[5.1.x-dev, v5.1-beta.1, v5.1-rc.1, v5.1-rc.2, v5.1-rc.3, v5.1.0, v5.1.1, v5.1.10, v5.1.11, v5.1.12, v5.1.13, v5.1.14, v5.1.15, v5.1.16, v5.1.17, v5.1.18, v5.1.19, v5.1.2, v5.1.3, v5.1.4, v5.1.5, v5.1.6, v5.1.7, v5.1.8, v5.1.9] but these conflict with your requirements or minimum-stability.
- Installation request for topthink/think-worker ^2.0 -> satisfiable by topthink/think-worker[v2.0.0, v2.0.1, v2.0.2, v2.0.3, v2.0.4, v2.0.5].
Installation failed, reverting ./composer.json to its original content.
The prompt here is to restore the composer. JSON file. If it’s right, you can see something like topthink in the file. Delete it
I found a lot of information on the Internet, but they were all wrong. Later I found that it was a problem with the workerman version, so I need to install it again
I don’t know the meaning of – VVV behind here. Do you have any friends who know?Welcome to leave a message, thank you very much
composer require topthink/think-worker=1.0.* -vvv
If you need to be a server in windows, you need to
composer require workerman/workerman-for-win -vvv
After installation, there will be two more folders in the vendor directory under the root directory of the project. At this step, we can test according to the instructions in the manual
This is the problem I encountered in my work, record it, if there is anything wrong, please leave a message to discuss and exchange
Encountered when executing composer install or composer require
When reporting an error similar to the above code,
use the following code to solve the problem
composer install –ignore-platform-reqs
Or composer update — ignore platform reqs
Or composer require * * — ignore platform reqs