2

I am trying to install gcc 7.1 (http://hpc.sourceforge.net/) on a mac high sierra 10.13.6.

After download gcc compressed file, I run the following command,

gunzip gcc-7.1-bin.tar.gz
sudo tar -xvf  gcc-7.1-bin.tar -C /.

it prompts out the following error

x usr/local/: Can't set user=0/group=0 for usr/localFailed to set file flags

I searched online and this seems a permission issue. I followed the steps in https://github.com/Homebrew/brew/issues/3228, and tried the two different ways that have been reported successful

sudo chown -R $(whoami) $(brew --prefix)/*

or create the /usr/local/include directory before running sudo chown -R $(whoami) $(brew --prefix)/* to fix.

None of this work for me. Does anyone has any idea about for my problem? Not sure if this is an easy one.

Heming
  • 21
  • 2
  • I followed the direction in https://stackoverflow.com/questions/46459152/cant-chown-usr-local-for-homebrew-in-osx-10-13-high-sierra and use sudo chown -R $(whoami) /usr/local/* After that, just use chmod 777 * – Heming Sep 25 '18 at 03:31
  • The above steps fix my previous issue. However, when I run tar -xvf gcc-7.3-bin.tar -C /. I got the following error message: usr/local/: Can't update time for usr/local usr/local/bin/ usr/local/.com.apple.installer.keep: Can't unlink already-existing object – Heming Sep 25 '18 at 03:35
  • Previous steps have fixed the problem. The error message seems like just a warning. – Heming Sep 26 '18 at 22:03

0 Answers0