Last active
January 21, 2021 15:03
-
-
Save ddribin/c3aff5179fe68e4cc7ddc768ef260f33 to your computer and use it in GitHub Desktop.
A script to fake out Homebrew thinking gcc-5 is installed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ "$1" = "--version" ]; then | |
echo 'gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609' | |
exit 0 | |
fi | |
exit 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Copy this to
/usr/bin/gcc
and then Homebrew thinksgcc
is installed and won't ask to install it. This is useful when installing only bottles or formula that do not need compilation. Without this, installing a formula shows this error:Installing a compiler on a Linux server is not always desirable.