简体   繁体   English

在 Mac 上使用 homebrew 安装 aws-sam-cli 时出错:此错误源自子进程,可能不是 pip 的问题

[英]Error Installing aws-sam-cli with homebrew on Mac: This error originates from a subprocess, and is likely not a problem with pip

I'm trying to install aws-sam-cli with homebrew but I keep running into errors with pip.我正在尝试使用自制软件安装aws-sam-cli ,但我一直遇到 pip 错误。

Command: brew install --build-from-source aws-sam-cli (A suggestion from here )命令: brew install --build-from-source aws-sam-cli (来自这里的建议)

Full log output:完整日志 output:

Downloading https://api.github.com/repos/aws/aws-sam-cli/tarball/v1.53.0 Already downloaded: /Users/xxxx/Library/Caches/Homebrew/downloads/83481a8e9be3330f9960015919f25317b568fa8de7b6356eb075525e3e195f23--aws-aws-sam-cli-v1.53.0-0-gd2ded65.tar.gz ==> Installing aws-sam-cli from aws/tap ==> python3.8 -m venv --system-site-packages /Users/xxxx/homebrew/Cellar/aws-sam-cli/1.53.0/libexec ==> /Users/xxxx/homebrew/Cellar/aws-sam-cli/1.53.0/libexec/bin/pip install --upgrade pip ==> /Users/xxxx/homebrew/Cellar/aws-sam-cli/1.53.0/libexec/bin/pip install -v --ignore-installed /private/tmp/aws-sam-cli-20220810-6534-nwvmma/aws-aws-sam-cli-d2ded65 Last 15 lines from /Users/xxxx/Library/Logs/Homebrew/aws-sam-cli/03.pip: │ exit code: 1 ╰─> See above for output. Downloading https://api.github.com/repos/aws/aws-sam-cli/tarball/v1.53.0 Already downloaded: /Users/xxxx/Library/Caches/Homebrew/downloads/83481a8e9be3330f9960015919f25317b568fa8de7b6356eb075525e3e195f23--aws-aws-sam -cli-v1.53.0-0-gd2ded65.tar.gz ==> 从 aws/tap 安装 aws-sam-cli ==> python3.8 -m venv --system-site-packages /Users/xxxx/homebrew/ Cellar/aws-sam-cli/1.53.0/libexec ==> /Users/xxxx/homebrew/Cellar/aws-sam-cli/1.53.0/libexec/bin/pip install --upgrade pip ==> /Users /xxxx/homebrew/Cellar/aws-sam-cli/1.53.0/libexec/bin/pip install -v --ignore-installed /private/tmp/aws-sam-cli-20220810-6534-nwvmma/aws-aws -sam-cli-d2ded65 来自 /Users/xxxx/Library/Logs/Homebrew/aws-sam-cli/03.pip 的最后 15 行:│ 退出代码:1 ╰─> output 见上文。

note: This error originates from a subprocess, and is likely not a problem with pip.注意:此错误源自子进程,可能不是 pip 的问题。 full command: /Users/xxxx/homebrew/Cellar/aws-sam-cli/1.53.0/libexec/bin/python3.8 /private/tmp/pip-standalone-pip-npto4dyu/ env_pip .zip/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-3hf8bh7a/overlay --no-warn-script-location --no-binary:none: --only-binary:none: -i https://pypi.org/simple -- setuptools wheel cwd: [inherit] Installing build dependencies: finished with status 'error' error: subprocess-exited-with-error完整命令:/Users/xxxx/homebrew/Cellar/aws-sam-cli/1.53.0/libexec/bin/python3.8 /private/tmp/pip-standalone-pip-npto4dyu/ env_pip .zip/pip install --忽略安装 --no-user --prefix /private/tmp/pip-build-env-3hf8bh7a/overlay --no-warn-script-location --no-binary:none: --only-binary:none: -i https://pypi.org/simple -- setuptools wheel cwd:[继承]安装构建依赖项:完成状态“错误”错误:subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully. × pip 子进程安装构建依赖项没有成功运行。 │ exit code: 1 ╰─> See above for output. │ 退出代码:1 ╰─> output见上。

note: This error originates from a subprocess, and is likely not a problem with pip.注意:此错误源自子进程,可能不是 pip 的问题。 Could not fetch URL https://pypi.org/simple/pip/ : There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)'))) - skipping Could not fetch URL https://pypi.org/simple/pip/ : There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/ pip/(由 SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败:无法获取本地颁发者证书 (_ssl.c:1131)')) - 跳过

I don't have access to sudo , so I can't run administrative commands.我无权访问sudo ,因此无法运行管理命令。 I'm able to install sam with pip install aws-sam-cli though.不过,我可以使用pip install aws-sam-cli

I've also tried some suggestions from here , setting ~/.config to我也从这里尝试了一些建议,将~/.config设置为

[global]
trusted-host = pypi.python.org files.pythonhosted.org pypi.org pypi.io

Edit: Brew Configurations:编辑:酿造配置:

brew config

HOMEBREW_VERSION: 3.5.8
ORIGIN: https://github.com/Homebrew/brew
HEAD: ff9c2500195cc357d4a06f99d462f8d8a5d37892
Last commit: 5 days ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: cbee80e4907b6d2f643cc7108d4197211ea28917
Core tap last commit: 72 minutes ago
Core tap branch: master
HOMEBREW_PREFIX: /Users/xxxx/homebrew
HOMEBREW_REPOSITORY: /Users/xxxx/homebrew
HOMEBREW_CELLAR: /Users/xxxx/homebrew/Cellar
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.8 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
CPU: octa-core 64-bit arm_firestorm_icestorm
Clang: 13.1.6 build 1316
Git: 2.32.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.79.1 => /usr/bin/curl
macOS: 12.5-arm64
CLT: 13.4.0.0.1.1651278267
Xcode: N/A
Rosetta 2: false

brew doctor

Warning: Your Homebrew's prefix is not /opt/homebrew.
Some of Homebrew's bottles (binary packages) can only be used with the default
prefix (/opt/homebrew).
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving any issues you experience while you are running this
unsupported configuration.

Warning: /private/tmp is world-writable but does not have the sticky bit set.
To set it, run the following command:
  sudo chmod +t /private/tmp

And my Path has been reconfigured to: /Users/xxxx/Library/Python/3.8/bin/:/Users/xxxx/homebrew/bin:/Users/Ufuoma.Apoki/.serverless/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin我的路径已重新配置为: /Users/xxxx/Library/Python/3.8/bin/:/Users/xxxx/homebrew/bin:/Users/Ufuoma.Apoki/.serverless/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Like I said previously, I don't have admin privileges so I can't install in /opt and I can't run sudo chmod +t /private/tmp就像我之前说的,我没有管理员权限,所以我无法安装在/opt中,也无法运行sudo chmod +t /private/tmp

I also had problems with installation aws-sam-cli and this finally helped me:我在安装 aws-sam-cli 时也遇到了问题,这终于帮助了我:

python3 -m pip install aws-sam-cli

Did you try this?你试过这个吗?

brew tap aws/tap
brew install aws-sam-cli

As per the documentation .根据文档

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM