gpt4 book ai didi

macos - 我收到此错误 "can' t 解压缩数据; zlib 不可用”在 MacOS 10.15 上安装 AWS EB CLI 时

转载 作者:行者123 更新时间:2023-12-04 10:38:22 25 4
gpt4 key购买 nike

我正在尝试安装 AWS Elastic Beanstalk CLI (https://github.com/aws/aws-elastic-beanstalk-cli-setup),但在理解它为什么不起作用时遇到了最大的麻烦(我不擅长这种东西,所以它可能很容易..)

我已按照所有设置说明进行操作,但在运行此命令 ./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


我的 .zshrc 中有以下内容文件:
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"
CPPFLAGS="-I$(brew --prefix openssl)/include -I$(brew --prefix zlib)/include"

所以我不知道发生了什么...

唯一可以解释这一点的是我在使用 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作为符号链接(symbolic link),所以我不明白..
$ 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
...

最佳答案

您可以尝试安装EB CLI via Homebrew .这适用于我的情况,而其他方法详述 here没有。

关于macos - 我收到此错误 "can' t 解压缩数据; zlib 不可用”在 MacOS 10.15 上安装 AWS EB CLI 时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60052424/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com