Issue
I am following this tutorial. When I get to around the 11:48 minute mark, I am supposed to run the command:
composer create-project laravel/laravel .
To which the terminal response is:
zsh: command not found: composer
I am not sure if this is necessary, but here is my docker-composer.yml file:
version: '3'
networks:
laravel:
services:
nginx:
image: nginx:stable-alpine
container_name: nginx
ports:
- "8088:80"
volumes:
- ./src:/var/www/html
- ./nginx/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- mysql
networks:
- laravel
mysql:
image: mysql:5.7.22
container_name: mysql
restart: unless-stopped
tty: true
ports:
- "4306:3306"
volumes:
- ./mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- laravel
php:
build:
context: .
dockerfile: Dockerfile
container_name: php
volumes:
- ./src:/var/www/html
ports:
- "9000:9000"
networks:
- laravel
I had to install homebrew before I could install composer using the commands from the composer website.
The terminal confirmed that Composer version 1.10.10 was successfully installed.
Regardless, I'm still getting "command not found: composer" in the terminal.
How do I fix this?
Solution
This problem arises when you have composer installed locally.To make it globally executable,run the below command in terminal
sudo mv composer.phar /usr/local/bin/composer
Answered By - albus_severus
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.