아래 에러가 나오는 경우

$ aws --version
dyld[46479]: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/aws/bin/python
  Reason: tried: '/usr/local/aws/bin/../.Python' (no such file), '/usr/local/lib/.Python' (no such file), '/usr/lib/.Python' (no such file)
Abort trap: 6
$

 

원인은 구버전 파이썬으로 aws cli를 설치하고 파이선을 업그레이드를 하면 이런 현상이 발생합니다. 

이럴 경우에는 aws cli 를 다시 설치하고 링크를 갱신하면 된다고 합니다. 

$ aws --version
dyld[46479]: Library not loaded: @executable_path/../.Python
  Referenced from: /usr/local/aws/bin/python
  Reason: tried: '/usr/local/aws/bin/../.Python' (no such file), '/usr/local/lib/.Python' (no such file), '/usr/lib/.Python' (no such file)
Abort trap: 6

$ brew uninstall awscli
Uninstalling /usr/local/Cellar/awscli/2.6.4... (12,629 files, 101.5MB)

$ brew install awscli
==> Downloading https://ghcr.io/v2/homebrew/core/awscli/manifests/2.6.4
...
==> Summary
🍺  /usr/local/Cellar/awscli/2.6.4: 12,629 files, 101.5MB
==> Running `brew cleanup awscli`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).

$ brew link --overwrite awscli
Linking /usr/local/Cellar/awscli/2.6.4... 6 symlinks created.

$ aws --version
aws-cli/2.6.4 Python/3.9.12 Darwin/21.4.0 source/x86_64 prompt/off
$

Ref : https://stackoverflow.com/questions/59605991/how-do-i-fix-dyld-library-not-loaded-if-i-installed-the-aws-cli-with-pip3

 

How do I fix "dyld: Library not loaded" if I installed the AWS CLI with pip3?

I am trying to deploy a lambda with the AWS CLI. It was working a few months ago but now it's not. Followed these instructions to install the CLI: https://docs.aws.amazon.com/cli/latest/userguide/

stackoverflow.com

 

 

+ Recent posts