Folder `usr/local/bin` doesn't exists on a MacBook Pro M1 Max, docker can't be installed

I am trying to install the docker desktop for Mac with M1 Max chip, using the package from the official website - https://hub.docker.com/editions/community/docker-ce-desktop-mac.

After the installation docker.app fails to open because of cannot install symlinks in /usr/local/bin (stage 5) error.

I have binary file bin inside usr/local and the only working solution for me was to rename bin file to bin.old just not to remove it completely and to create a folder bin

Then the docker installation succeeds. What is the correct way of handling this problem?

P.S. I am using Monterey 12.0 OS version


Solution 1:

I upgraded the OS from 12.0 to 12.1 and made a factory reset. After that /usr/local is empty.

This time Docker installed successfully