Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

laracasts9924's avatar

ZSH on Mac, does not install PHP Packages using Composer since update to Catalina 10.15.5

Here is my Mac setup. I am running MAMP 5.7 I also have iTerm 2 w/ zsh installed. Everything was running fine before update.

I had to restart my macbook which then went into a software update. So it updated to 10.15.5 Catalina.

Now, when I am in the terminal, either iTerm 2 zsh, PHP Storm, or Visual Studio Code. my terminal will not run composer install or composer update. It just sits there. No errors. It starts, I get the normal starting line

Loading composer repositories with package information Updating dependencies (including require-dev)

But nothing happens.

In iTerm2 I have the correct PHP path which is /Applications/MAMP/bin/php/php7.4.2/bin/php composer path is correct: /usr/local/bin/composer

I have ran composer clear-cache.

Nothing is working.

Ran composer diagnose. Everything is good. All green OK.

Any help would be greatly appreciated.

I also tried the verbose flag and the same.

0 likes
13 replies
laracasts9924's avatar

OK. let me adjust my issue. Doing some testing, I git cloned a Laravel repo to my htdocs. Then I composer install and it worked fine.

So it seems when I try to use this composer command to pull a fresh Laravel instance. This does not work.

composer create-project --prefer-dist laravel/laravel blog

I tried older versions the same

composer create-project --prefer-dist laravel/laravel blog "5.8.*"
laracasts9924's avatar

Still testing. So I went to github found the laravel 5.7 branch. Git cloned to my local. So now I have a copy of Laravel 5.7, I then composer install nothing.

laracasts9924's avatar

More testing. This is so crazy. So now I already have a Laravel app on my local. So I tried to install Laravel DebugBar. The results nothing happens.

I cannot pin point where the issue is.

  1. Composer create-project does not work for any Laravel version.
  2. I download a copy of Laravel from github: git clone. Then composer install nothing.
  3. I then git cloned another one of my Laravel apps in a github repo. I then composer install and it WORKS. Pulls all PHP packages
  4. I then go to a different working Laravel app on my local Macbook, I then try to install Laravel Debugbar, and it does not work.

This is frustrating.

laracasts9924's avatar

@MaverickChan

so it appears to be using the same PHP.

 MAMP/htdocs/miniblog which php
/Applications/MAMP/bin/php/php7.4.2/bin/php

MAMP/htdocs/miniblog php -v
PHP 7.4.2 (cli) (built: Feb 17 2020 12:56:02) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

MaverickChan's avatar

how did you install composer? Did you follow the offical instruction? what is the version of composer?

laracasts9924's avatar

@maverickchan

Yes official documentation.

composer version 1.10.10

I have been using this macbook and composer without any issues for the past 3 years.

This just started with the update to Catalina 10.15.5.

So yesterday, I went ahead and updated to the most recent ios version 10.15.6. Hoping that would maybe fix any issues.

No luck.

Again some situations composer works perfectly. Then other situations it does not. See pervious post.

MaverickChan's avatar

oh , i think you may have to re-install MAMP.

But , i would suggest you to install PHP via Homebrew , it is more reliable and easy to maintain no matter how you upgrade the os. Then you could use valet to manage different sites.

laracasts9924's avatar

@maverickchan thanks for the help. So it seems that with the new Mac updates, they have made zsh the default shell. I already had zsh and oh my zsh installed and working using my older bash_profile script. With this update, it makes the bash_profile to not work. So I moved over my settings from my bash_profile to my zprofile file and of course still does not work.

I have tried everything I could think of. I have uninstalled oh my zsh and using Brew to reinstall zsh, reinstalled ohmyzsh, Brew did a clean up. No luck.

After reinstalling zsh, I try to change my shell using the path where Brew installed the original version that I had working for years, but every time I try to change my shell path, mac will not let me. states Non Standard Shell

I even tried to change it back to bash and the same non standard shell.

I then told my .zprofile file to use my bash_profile and it states this script is deprecated.

Nothing is working, and my Mac forces me to use zsh at bin/zsh

Thanks for all of the help.

MaverickChan's avatar

did you check your zsh profile? ~/.zshrc , not a bash profile or , in zsh shell , type exit to bash

really weired, i did update my system from mojave to catalina before , little buggie , but still work hope you find a solution soon

laracasts9924's avatar

@maverickchan thanks again, so I am trying to move over to Valet but cannot get it to download.

As usually it just sits there and does nothing.

composer global require laravel/valet

nothing will install

somewhat dead in the water on certain projects until I find a fix.

I did confirm that my terminal is using the zprofile and zshrc that I am editing.

Thanks again for all of your help.

MaverickChan's avatar

@dxladner this could be a network problem , please try a mirror server , you can google composer mirror. dont' worry. there always a solution.

restart your computer , clear dns cache , restart your broadband router to refresh , these methods maybe a magic

good luck

laracasts9924's avatar

@maverickchan thanks again. tried all of your suggestion without success. I even went through and checked file/folder permissions with no luck.

cannot figure out why some projects, I can run composer install and it works perfectly and the rest nothing happens.

my npm install works perfectly on everything.

I am stumped. Dont know where to turn.

Any suggestions from anyone?

Please or to participate in this conversation.