Cannot install Hugo under Amazon Linux 2

Hello,
I am running into issues when trying to run brew install hugo within my AWS Cloud9 IDE (running Amazon Linux 2).

I did that before, so I am surprised that I am not able to install Hugo successfully this time. Maybe I am missing something.

Brew is successfully installed - running version 3.6.10.
When I run brew install hugo, I am getting the following error message:

checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/tmp/xz-20221113-5435-gyv9oh/xz-5.2.7':
configure: error: C compiler cannot create executables
See `config.log' for more details

GCC 7.3.1 is installed.

Any ideas what is missing here?

Out of curiosity, when you installed brew, did you install gcc when prompted? If I remember correctly that happens toward the end of the brew installation. I’m just wondering if brew wants its own compiler.

Thank you for your feedback, Joe.

It seems that the issue was caused by the homebrew installation.
This Question helped me:

So these were the steps I took to successfully install Hugo on Amazon Linux 2 (in my Cloud9 IDE):
1/ Create Cloud9 IDE running Amazon Linux 2

2/ Install Homebrew as given here:

3/ Install GCC as given here:

4/ Run the correction steps given in the mentioned Github Question:

running

brew update
brew install binutils
brew install gcc@7

5/ Install Hugo as given in here:

via brew install hugo

6/ confirm successfull installation via hugo version

2 Likes

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.