The following tutorial column of composer will introduce to you how to deal with errors when composer installs dependencies. I hope it will be helpful to friends in need!
0x02 "Your requirements could not" appeared be resolved to an installable set of packages.”
When using the following commands to install composer.json, the following two problems often occur.
composer install
0x01 During installation, composer appeared Killed and was terminated
This situation is caused by insufficient cache. In Linux, we can increase the cache to solve this problem.
free -m mkdir -p /var/_swap_ cd /var/_swap_ dd if=/dev/zero of=swapWhat should I do if composer gets an error when installing dependencies? bs=1M count=2000 mkswap swapWhat should I do if composer gets an error when installing dependencies? swapon swapWhat should I do if composer gets an error when installing dependencies? echo "/var/_swap_/swapWhat should I do if composer gets an error when installing dependencies? none swap sw 0 0" >> /etc/fstab free -m
This kind of error message The situation is generally like this
###Although it appears "Your requirements could not be resolved to an installable set of packages.", "You can also run ###php --ini### inside terminal to see which What should I do if composer gets an error when installing dependencies?s are used by PHP in CLI mode." These two prompts, but this is not the focus of our attention. ######What we need to pay attention to is what content is prompted by the middle Problem######For example, in the following situation###############In this case, we just You only need to install the gd corresponding to php to solve this error. ######Here I use Ubuntu as an example to illustrate. If you install php7.0, you can use the following command to install it. ###apt-get install php7.0
apt-get install php7.0-gd
apt-get install php7.0-mbstring
apt-get install php7.2-mbstring
The above is the detailed content of What should I do if composer gets an error when installing dependencies?. For more information, please follow other related articles on the PHP Chinese website!