php73命令問(wèn)題
由于之前裝php的時(shí)候酱塔,php的命令名變成了php73狠轻,導(dǎo)致composer安裝失敗升筏,可以通過(guò)以下命令解決
cp /usr/bin/php73 /usr/bin/php
安裝composer
php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php
All settings correct for using Composer
Downloading...
Composer (version 1.6.5) successfully installed to: /root/composer.phar
Use it: php composer.phar
配置全局調(diào)用composer
mv composer.phar /usr/local/bin/composer
切換為國(guó)內(nèi)鏡像:
#首先把默認(rèn)的源給禁用掉
composer config -g secure-http false
#再修改鏡像源 這里我使用阿里的源
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
#修改成功后可以先查看一下配置
composer config -g -l
#第二行repositories.packagist.org.url 如果是阿里的就代表成功
更新 composer:
composer selfupdate
最后編輯于 :2020.09.04 09:50:21
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者