Command “self-update“ is not defined.

Command “self-update” is not defined

出现这个问题是composer的版本跟现有 php版本不兼容的问题

解决方案:

  • 删除原有的composer

apt-get purge composer

  • 安装新的的composer

php -r “copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);”;

  • 给到相应的权限

sudo php composer-setup.php --install-dir=/usr/bin --filename=composer;

  • 更新composer
    composer self-update

你可能感兴趣的:(composer,php)