Cannot install sage on macOS Catalina 10.15.6

Ok, I figured something out. Installation of sage 9 fails because of my composer version. I had 2.3.5. Deleted that and installed composer 2.0.14 and it worked.

Install composer:

Sage9 installation works with an older Version of composer. I used 2.0.14. the latest one results in an error.

You should setup the complete project (including Bedrock) with this version of composer.

Eventually delete your old composer version:

Thus write in terminal:

  1. php -r "copy(‘https://getcomposer.org/installer’, ‘composer-setup.php’);“

  2. IMPORTANT: Check this website for an up to date hash: Composer

  3. php -r "if (hash_file(‘sha384’, ‘composer-setup.php’) === ‘USE UP TO DATE HASH’) { echo ‘Installer verified’; } else { echo ‘Installer corrupt’; unlink(‘composer-setup.php’); } echo PHP_EOL;“

  4. php composer-setup.php —version=2.0.14

  5. php -r "unlink(‘composer-setup.php’);“

Then Follow this: How to install Composer globally on Mac OS

Caveat: there is no .zshrc file in the user directory in Catalina. It is in /etc/