我得到这个错误;can';t解压数据;zlib不可用”等;在MacOS 10.15上安装AWS EB CLI时

我得到这个错误;can';t解压数据;zlib不可用”等;在MacOS 10.15上安装AWS EB CLI时,macos,amazon-web-services,amazon-elastic-beanstalk,zsh,zlib,Macos,Amazon Web Services,Amazon Elastic Beanstalk,Zsh,Zlib,我正在尝试安装AWS Elastic Beanstalk CLI(),但在理解它为什么不工作时遇到了最大的困难(我不擅长这类东西,所以可能很简单。) 我已按照所有安装说明进行了操作,但在运行此命令时,我得到以下输出和错误/aws elastic beanstalk cli setup/scripts/bundled_installer: ============================================== I. Installing Python

我正在尝试安装AWS Elastic Beanstalk CLI(),但在理解它为什么不工作时遇到了最大的困难(我不擅长这类东西,所以可能很简单。)

我已按照所有安装说明进行了操作,但在运行此命令时,我得到以下输出和错误
/aws elastic beanstalk cli setup/scripts/bundled_installer

==============================================
I. Installing Python                          
==============================================

*************************************************************
1. Determining whether pyenv is already installed and in PATH
*************************************************************
    - pyenv was not found in PATH.

*********************************************************
2. Determining whether pyenv should be cloned from GitHub
*********************************************************
    - pyenv git repository already cloned to /Users/apple/.pyenv-repository. Won't attempt to clone again.

*******************************************
3. Temporarily export necessary pyenv paths
*******************************************

****************************************************************************
4. Checking whether Python can be downloaded (through curl, wget, or aria2c)
****************************************************************************

************************************************************
5. Installing Python 3.7.2. This step may take a few minutes
************************************************************
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 10.15.2 using python-build 20180424)

Inspect or clean up the working tree at /var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457
Results logged to /var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457.log

Last 10 log lines:
  File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__main__.py", line 5, in <module>
    sys.exit(ensurepip._main())
  File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__init__.py", line 204, in _main
    default_pip=args.default_pip,
  File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__init__.py", line 117, in _bootstrap
    return _run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/private/var/folders/t9/6kkmnhns6g9192p5r2zwmf640000gn/T/python-build.20200204155232.99457/Python-3.7.2/Lib/ensurepip/__init__.py", line 27, in _run_pip
    import pip._internal
zipimport.ZipImportError: can't decompress data; zlib not available
make: *** [install] Error 1
   Exiting due to failure

所以我不知道发生了什么

唯一可以解释这一点的是我在使用brew安装zlib时收到的以下消息:

==> Caveats
zlib is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.
但是,当转到中的
/usr/local/opt
时,可以将
zlib
视为符号链接,所以我不理解

$ ll /usr/local/opt/
total 0
lrwxr-xr-x  1 apple  admin    28B Feb  4 14:43 openssl -> ../Cellar/openssl@1.1/1.1.1d
lrwxr-xr-x  1 apple  admin    28B Feb  4 14:43 openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1d
lrwxr-xr-x  1 apple  admin    21B Feb  4 15:13 zlib -> ../Cellar/zlib/1.2.11
...

您可以尝试安装。这在我的案例中起作用,而其他详细的方法则不起作用

这有用吗@RodrigoM我在MacOS上,所以我用下面的
brew install zlib openssl readline安装了它,所以我认为你的链接对我没有帮助(这是我的错,我没有指定我在mac上)。我也无法在mac上使用它,尽管我遵循了故障排除部分中的说明。我用
pip
安装时运气要好得多。请注意,如果您已经安装了aws cli,那么这两个安装之间存在冲突,您将不得不降级aws cli:@littleforest谢谢,我会试试的。是的,但我在某个地方(我认为在问题部分)看到,这正在取代它,我们不应该再使用自制版本。是的,很好。在第节下,有一个关于brew的答案。然而,答案只是说他们的方法“更好”。我很确定我在其他地方看到了一些东西,但是的,我会试试这个,如果它解决了我的问题,我根本不在乎。我将在本周晚些时候试一试,谢谢
$ ll /usr/local/opt/
total 0
lrwxr-xr-x  1 apple  admin    28B Feb  4 14:43 openssl -> ../Cellar/openssl@1.1/1.1.1d
lrwxr-xr-x  1 apple  admin    28B Feb  4 14:43 openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1d
lrwxr-xr-x  1 apple  admin    21B Feb  4 15:13 zlib -> ../Cellar/zlib/1.2.11
...