Write about the annoying problems encountered when installing composer and composer installing dependent packages

Install composer

When installing the composer thing, I think it’s that simple to install one thing. Of course, it’s really simple, but I started to torture people when I installed the dependency package and reported various errors. Today I will share the pits I encountered. Right.

Install the package first

This thing is done directly under the official website, but I feel that the latest version of composer is not very stable, try not to use foreign countries, sometimes domestic and foreign communications are not good (link: link .).

Installation noteDon’t check this, it won’t be uninstalled

Don’t tick this. If you tick it, you won’t be able to uninstall it.
This depends on your installation path, I am under D drive
This depends on the path of your installation. I’m under the D drive, followed by brainless next.
If this screen appears, there is no problem with the installation
If this screen appears after installation, there is no problem with the installation. What is the corresponding package?
Enter the command to composer config -glcheck the url currently in use. I use Ali’s
Ali mirror
composer even if the installation is successful, and then install the dependency package.
The pit is here.

First look at the basic problems encountered. This has been handled in advance and has not stepped on the pit

I use a small leather panel. As for wamp, the principle is the same. Find the corresponding version of php.ini and check the configuration file.
Insert picture description here
Basically, it should be turned on. If it is not turned on, remove the previous comment.
Go to packagist: link later. Look for the package. I used a noahbuscher/macaw routing package
. It will be introduced later.
Insert picture description here
Create a composer.json under the root directory, as shown above, and Insert picture description here
Insert picture description here
then go to the command line and enter composer install to start installing the dependency package , And
Insert picture description here
then reported a very strange problem, you need to use git, after downloading git later, start writing the command line in git CMD The
Problem solved
problem is solved, as for the regular errors on the Internet, it is tiring not to list the codewords.

Guess you like

Origin blog.csdn.net/weixin_44088587/article/details/109493625