Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The solution to the failure of installing extension in composer Server

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Xiaobian to share with you the composer server installation extension failure solution, I believe most people still do not know how, so share this article for everyone's reference, I hope you have a lot of harvest after reading this article, let's go to understand it together!

ps : Server configuration

Linux VM-0-9-ubuntu 4.4.0-91-generic #114-Ubuntu SMP Tue Aug 8 11:56:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

1. failure experience

During the installation of easyswood, it was found that it could not be installed through composer

The error message is as follows:

ubuntu@VM-0-9-ubuntu:~/demo/easyswoole$ composer require easyswoole/easyswoole=3.x./ composer.json has been createdLoading composer repositories with package informationUpdating dependencies (including require-dev)Installation failed, deleting ./ composer.json. [ErrorException] "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? require [--dev] [--prefer-source] [--prefer-dist] [--no-plugins] [--no-progress] [--no-update] [--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--] []..

Google it, there is no corresponding error message. Check out the composer version first.

Found: composer version is too low, on the way to upgrade the composer upgrade said.

ubuntu@VM-0-9-ubuntu:~/demo/easyswoole$ composer -VComposer version @package_branch_alias_version@ (1.0.0-beta2) 2016-03-27 16:00:34

During the upgrade process, it was discovered that the upgrade failed. Older versions of composers cannot be automatically upgraded

ubuntu@VM-0-9-ubuntu:~$ composer self-update [InvalidArgumentException] Command "self-update" is not defined.

It seems that the composer package is too low, and there is no automatic upgrade function.

2. Download the new composer package

1. Add the latest composer

wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer sudo chmod a+x /usr/local/bin/composer

Then overwrite the script to the original (via soft chain)

2. View original location

sudo mv /usr/bin/composer /tmp/ sudo ln -s /usr/local/bin/composer /usr/bin/composer ubuntu@VM-0-9-ubuntu:~$ composer -VComposer version 1.8.5 2019-04-09 17:46:47

3. installation

Install projects using composer

The above is "composer server installation extension failure solution" all the content of this article, thank you for reading! I believe that everyone has a certain understanding, hope to share the content to help everyone, if you still want to learn more knowledge, welcome to pay attention to the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report