报错信息:
git was not found in your PATH, skipping source download
报错原因通常是因为docker环境中缺少必备的扩展,所以会安装失败,上面的报错是由于缺乏docker git,容器内安装git就行。
解决方案:
1. 切换docker源,命令行输入:
echo "deb http://mirrors.163.com/debian/ stretch main non-free contrib" >/etc/apt/sources.list
echo "deb http://mirrors.163.com/debian/ stretch-proposed-updates main non-free contrib" >>/etc/apt/sources.list
echo "deb-src http://mirrors.163.com/debian/ stretch main non-free contrib" >>/etc/apt/sources.list
echo "deb-src http://mirrors.163.com/debian/ stretch-proposed-updates main non-free contrib" >>/etc/apt/sources.list
这一步不是必须的,但每个容器默认用的是国外的安装源,速度很慢,经常会出现一些莫名其妙的BUG。
2. 切换安装源,或者新创建容器后需要更新系统软件包:
# 升级
apt-get upgrade
# 更新
apt-get update
# php gd依赖库
apt install -y libwebp-dev libjpeg-dev libpng-dev libfreetype6-dev
3. 安装docker git
apt-get install zip unzip git
通常来说,安装失败缺少的扩展就是上面三个,如果安装失败,尝试切换镜像或着将其分开安装:文章来源:https://www.toymoban.com/news/detail-707476.html
如 :apt-get install zip文章来源地址https://www.toymoban.com/news/detail-707476.html
到了这里,关于docker composer安装laravel报错的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!