Not able to install linuxbrew on my ubuntu machine

1.7k Views Asked by At

When I try to install Linux brew I m getting permission issue.

Below is the error message I m getting.

Press RETURN to continue or any other key to abort
==> Downloading and installing Linuxbrew...
/home/linuxbrew/.linuxbrew/Homebrew/.git/branches/: Permission denied
Failed during: git init -q

I tried to set folder permission but it's not working.

sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"

Press RETURN to continue or any other key to abort
==> Downloading and installing Linuxbrew...
/home/linuxbrew/.linuxbrew/Homebrew/.git/branches/: Permission denied
Failed during: git init -q
1

There are 1 best solutions below

0
VonC On

First, sudo chmod 755 /home/linuxbrew/ would apply 755 on /home/linuxbrew/ only, not on sub-folders.

Second, in addition of chmod, check the owner of /home/linuxbrew/ and its sub-folders.
See for instance Linuxbrew/brew issue 550:

It was caused by having an existing /home/linuxbrew/.linuxbrew/Homebrew directory that is not owned by you.
PR 22 should fix that.