Install Composer Macos Catalina

I know Media Composer is not certified for Big Sur, but at least on my Mac Pro 2019, Big Sur is a lot more stable than Catalina. The graphic drivers are better (no weird shifting of characters in fonts) and I don't have the occasional inability to wake up the computer that I had in Catalina. AMC so far is working well. This section contains notes and hints specific to installing PHP on macOS. PHP is bundled with macOS since macOS X (10.0.0) prior to macOS Monterey (12.0.0). Compiling is similar to the Unix installation guide. Open the Terminal app on your Mac. Install Homebrew via the instructions here: 3. Install Composer globally on your Mac with this command: brew install composer. If your computer doesn’t have a “/usr/local/bin” directory, create that first with this command: sudo mkdir -p /usr/local/bin.

  • I want to install composer for laravel development on my latest version of mac OS. I followed all the step by step instructions to install composer on the website and it installed composer.phar.
  • Noting: that many would argue running composer locally on your macOS is not a good idea. You should be running it in a VM or container that matches your production environment's stack configuration. 2 things need to be done here: 1) for people compiling composer locally on macOS Catalina, add the library see: Stackexchange topic.

Question or issue on macOS:

I am trying to run composer update and I get the following errors:

when running composer update

Overnight I have made the mistake of my life and allowed my Mac to automatically update the OS, so I am in macOS Catalina now.

I have tried adding

to my composer.json..but its not downloading that extension.

How to solve this problem?

Solution no. 1:

I had the same problem after updating my Mac to Catalina. Here is what worked for me.

Then reload your console.

It will install php 7.3.10 with zip module. You can use php -v to check for the version, and php -m for the modules.

Solution no. 2:

Following command fixed the issue on macOS Catalina

Solution no. 3:

On 10 March 2020, It works for me:

It is the only one command about PHP which work.
So, I think that the commands shown in the last posts are deprecated.

Solution no. 4:

If brew link is not working for you, check your php version installed by:

Install Composer Macos Catalina Os

Here, you will see a version as such:

Should give you an output like:

Now you just need to link that to your $PATH which can be done as:

Note: I am using .zshrc because that is my terminal setup. If yours is bash, use accordingly.

You can check which version of php is now linked to your MacOS by running:

This should give you an output of:

That’s it. Now if you try composer update, it should not give you the extension issue.

Source (part of it): https://medium.com/@jjdanek/installing-php-extensions-on-mac-after-homebrew-acfddd6be602

Install Composer Macos Catalina

Solution no. 5:

2020-05-16 updated

Like @marc-alexander said, this is a bad practice. You should not use --ignore-platform-reqs option if you do not sure what you are doing.

I thought the option would ignore the platform requirements and install the specific version of the packages. But in fact it will ignore the platform requirements and install the highest available version of the packages.

So if you need the missing PHP extension, you should just install (or enable) it

Reference: ignore-platform-reqs installs dev-master instead of correct version

Original

If you do not need ext-zip (e.g. You just want to do some quick fix), you can use --ignore-platform-reqs option to ignore the requirements:

Solution no. 6:

I had problems with python symlink during the brew install php.

/usr/local/Frameworks didn’t exist so I had to create it:
sudo mkdir /usr/local/Frameworks

cd /usr/local/

Then I had to chown it:
sudo chown -R myuser:admin Frameworks

I based the permission settings on the rest of the folders in /usr/local.

Install Composer Macos Catalina Update

Then I could run brew link python.
Then I ran brew install php again and it completed.

php -v now gives me php 7.3.10 , before it was php 7.3.18 I think.

Solution no. 7:

This worked for me

brew update
brew install [email protected]
brew link [email protected]
brew link [email protected] --force

Hope it helps

Solution no. 8:

Instead of force linking you can also fix the problem in MacOS Catalina

by adding the php binary path to your bash profile e.g.:

Solution no. 9:

In my case I had to simply

Solution no. 10:

i know this thread has true answered, i do those with this approach :

  1. brew link [email protected] it is showing hint to using
    echo 'export PATH='/usr/local/opt/[email protected]/bin:$PATH' >> ~/.zshrc echo 'export PATH='/usr/local/opt/[email protected]/sbin:$PATH' >> ~/.zshrc

  2. in terminal, echo 'export PATH='/usr/local/opt/[email protected]/bin:$PATH' >> ~/.zshrc enter

  3. in terminal, echo 'export PATH='/usr/local/opt/[email protected]/sbin:$PATH' >> ~/.zshrc enter

  4. next execution this : source ~/.zshrc

  5. execution which php the results must show /usr/local/opt/[email protected]/bin/php

  6. try again composer update, if show Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/Cellar/composer/1.9.2/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
    please change php.ini limit with memory_limit = -1

  7. try search php.ini, type in terminal /usr/local/opt/[email protected]/bin/php --ini , the results must show: Configuration File (php.ini)
    Path: /usr/local/etc/php/7.3 Loaded Configuration File: /usr/local/etc/php/7.3/php.ini Scan for additional .ini files in: /usr/local/etc/php/7.3/conf.d Additional .ini files parsed: /usr/local/etc/php/7.3/conf.d/ext-opcache.ini

  8. nano /usr/local/etc/php/7.3/php.ini, append memory_limit =-1,save

  9. restart php

  10. re-execution composer update.

Install Composer Macos Catalina Free

Hope my answer can help you.

Install Composer Macos Catalina Download

Hope this helps!