Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the problem of bash: composer: command not found

Shulou Source: shulou.com Published: 2022-06-02 07:24:36 10月03日 Update

This article introduces the relevant knowledge of "how to solve the problem of bash: composer: command not found". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!

1. First read the wrong newspaper

For the wrong reasons, many things fail to install. Some online said it was an environmental variable problem, and one by one they couldn't solve it. Later, they saw a simple and crude method and tried it successfully.

3. I use phpstudy. Copy composer.phar and composer.bat under PHPStudy\PHPTutorial\tools\composer folder to the folder of the current version, and copy compo.phar and rename it composer.

3. Execute the following command to update your composer version

composer config repo.packagist composer https://packagist.phpcomposer.com

4. After execution, you will see a line of code in the composer.json file of your project

"repositories": { "packagist": { "type": "composer", "url": "https://packagist.phpcomposer.com" }}

Image installation method of composer

Method 2:

Download composer installation package: composer download address

After downloading and installing, install the following steps as follows:

Then go to the next step, to the following interface when the installation is successful:

Test whether the composer is installed successfully:

"How to solve bash: composer: command not found" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!

Tags: Problem success file method content folder more version knowledge utility rudeness achievement next one line thing code representative reason variable command Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information vpn macOS NVidia OPPO Reno