Search code examples
macosgcccmake

Installing "gcc" on Mac


I decided to install the "gcc" on my Mac Catalina(10.15.7), but it occurred an error when download the "cmake" . Here is the full report: Error: cmake: Failed to download resource "cmake" Failure while executing; /usr/bin/env /usr/local/Homebrew/Library/Homebrew/shims/shared/curl --disable --cookie /dev/null --globoff --show-error --user-agent Homebrew/4.0.13\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.7\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --fail --location --silent --head https://github.com/Kitware/CMake/releases/download/v3.26.3/cmake-3.26.3.tar.gz exited with 35. Here's the output: curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

I tried install a cmake app on my Mac, and I followed the instruction to install the command line use, and I checked the version of cmake using terminal command. Here is the report: cmake --version cmake version 3.26.3 Then I tried to install "gcc" again, and the same error occurred. What can I do?


Solution

  • The error message you're seeing indicates an issue during the download process of cmake using curl, which is required to install gcc via Homebrew.

    Try updating your Homebrew once: brew update

    If this also doesn't work try installing with the --verbose flag: brew install gcc --verbose

    You can also modify the Homebrew's curl command: brew install gcc HOMEBREW_CURL_FLAGS="--insecure"

    however, proceed with caution while writing the curl command.