Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

not able to install anything because of brew no such file or directory error

I am trying to install do brew install python3 on my mac but i keep getting the following errors:

this is the first error:

No such file or directory @ dir_chdir - /usr/local/Cellar

then a bit later i get this error:

An exception occurred within a child process: Errno::EPERM: Operation not permitted @ dir_s_mkdir - /usr/local/Cellar

I have ran brew update then brew doctor the brew cleanup but keep getting the error.
I have also checked to see if xcode is up-to-date but according to the appstore all my apps are up-to-date.

How do i fix this problem?

PS i also get these errors when trying to install other packages from brew.

like image 689
FutureCake Avatar asked Feb 05 '19 21:02

FutureCake


People also ask

Where is brew installed on Mac?

On Mac Intel machines, that's all you need to do; Homebrew is ready to use. On Mac Intel, Homebrew installs itself into the /usr/local/bin directory, which is already configured for access by the shell with the macOS default $PATH environment variable (the default is set by the /usr/libexec/path_helper command).


1 Answers

Try uninstalling Homebrew and then re-installing solved issue for me.

Uninstall Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Re-install Homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Performed in MacOS Mojave (10.14.4)

like image 163
Shefali Soni Avatar answered Sep 28 '22 11:09

Shefali Soni