guarinogabriel / Mac-CLI

 macOS command line tool for developers – The ultimate tool to manage your Mac. It provides a huge set of command line commands that automatize the usage of your Mac.
MIT License
8.86k stars 334 forks source link

mkdir: /usr/local/bin: Permission denied #150

Closed mrmattson closed 6 years ago

mrmattson commented 6 years ago

Hello! During initial install using the curl script, the install failed at the step to create directory /usr/local/bin. Here is the last few lines of output from the script before it quit the script:

...
bin not found
creating bin directory...
mkdir: /usr/local/bin: Permission denied
error in creating bin directory

I am trying to install Mac-CLI on a clean install of macOS v10.13.3. I had put in my administrator password at the beginning of the script when it asked. I don't think I'm inputting the password wrong as I have installed Mac-CLI on three clean installs of macOS. To work around this, I do the following, which works, but might not be the best user permissions for the bin directory:

sudo mkdir /usr/local/bin
sudo chown [username]:[group] /usr/local/bin'

Then I rerun the curl version of the install command and everything works.

guarinogabriel commented 6 years ago

Hi @mrmattson,

That error never happened to me before. I tried on a clean 10.13.4 MacOS installation but I wasn't able to reproduce the issue.

Please feel free to re-open the Github Issue if the error happens again for you and I will investigate further.

Thanks!