2

I'm trying to install the elastic beanstalk cli, like so:

./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer

But I'm getting the following error:

python-build: use openssl from homebrew
python-build: use readline from homebrew
Downloading Python-3.7.2.tar.xz...
-> https://www.python.org/ftp/python/3.7.2/Python-3.7.2.tar.xz
Installing Python-3.7.2...
python-build: use readline from homebrew

BUILD FAILED (OS X 11.1 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557
Results logged to /var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557.log

Last 10 log lines:
checking for python3.7... python3.7
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
checking MACHDEP... checking for --without-gcc... no
checking for --with-icc... no
checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
checking whether the C compiler works... no
configure: error: in `/var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/python-build.20210319024756.38557/Python-3.7.2':
configure: error: C compiler cannot create executables
See `config.log' for more details
   Exiting due to failure

For some reason, the installation script isn't detecting the C compiler. Of course, both the gcc and the cc commands work in the terminal. I'm using macOS 11.1. How do I fix this?

zendevil
  • 899
  • 4
  • 13
  • 26

1 Answers1

0

You need to run the commands using Roseta, and arch command can be used to run commands via Rosetta:

arch -x86_64 ./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer
Asri Badlah
  • 1,949
  • 1
  • 9
  • 20
  • did you try to run: brew install zlib openssl readline CFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix readline)/include -I$(xcrun --show-sdk-path)/usr/include" LDFLAGS="-L$(brew --prefix openssl)/lib -L$(brew --prefix readline)/lib -L$(brew --prefix zlib)/lib" – Asri Badlah Mar 18 '21 at 23:11