无法在 Linux 和 macOS 上安装 EB CLI(错误:未编译 Python ssl 扩展。缺少 OpenSSL 库?))

San*_*was 5 macos command-line-interface amazon-web-services

按照链接https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install.html?icmpid=docs_elasticbeanstalk_console我正在尝试安装EB CLI on MAC. 从页面上,我已经成功完成point 1Install the EB CLI on Linux and macOS

但是当我从第 2 点运行命令时,./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer我收到以下消息/错误

` ============================================== 一、安装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/cispl-reserve/.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
************************************************************
Downloading openssl-1.0.2k.tar.gz...
-> https://pyenv.github.io/pythons/6b3977c61f2aedf0f96367dcfb5c6e578cf37e7b8d913b4ecb6643c3cb88d8c0
Installing openssl-1.0.2k...
Installed openssl-1.0.2k to /Users/cispl-reserve/.pyenv/versions/3.7.2

Downloading readline-6.3.tar.gz...
-> https://pyenv.github.io/pythons/56ba6071b9462f980c5a72ab0023893b65ba6debb4eeb475d7a563dc65cafd43
Installing readline-6.3...
Installed readline-6.3 to /Users/cispl-reserve/.pyenv/versions/3.7.2

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...
ERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?

Please consult to the Wiki page to fix the problem.
https://github.com/pyenv/pyenv/wiki/Common-build-problems


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

Inspect or clean up the working tree at /var/folders/hq/znb1htl568j9rxcgqpgtkg5w0000gp/T/python-build.20190705142457.64163
Results logged to /var/folders/hq/znb1htl568j9rxcgqpgtkg5w0000gp/T/python-build.20190705142457.64163.log

Last 10 log lines:
            install|*) ensurepip="" ;; \
        esac; \
        ./python.exe -E -m ensurepip \
            $ensurepip --root=/ ; \
    fi
Looking in links: /var/folders/hq/znb1htl568j9rxcgqpgtkg5w0000gp/T/tmpobl4rhc0
Collecting setuptools
Collecting pip
Installing collected packages: setuptools, pip
Successfully installed pip-18.1 setuptools-40.6.2
Exiting due to failure

==============================================
II. Creating self-contained EBCLI installation
==============================================
./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer: line 51: /Users/cispl-reserve/.pyenv/versions/3.7.2/bin/python: No such file or directory
./aws-elastic-beanstalk-cli-setup/scripts/bundled_installer: line 28: echo_with_indentation: command not found
Run Code Online (Sandbox Code Playgroud)

`

小智 5

有同样的问题,答案在 repository 的4.1 部分。

4.1. 我可以跳过 Python 安装吗?

是的。如果您的系统上已经安装了 Python,则在步骤 2.1. 之后,运行以下命令。

在 Bash 和 Zsh 上:

python aws-elastic-beanstalk-cli-setup/scripts/ebcli_installer.py
Run Code Online (Sandbox Code Playgroud)