Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- apitestcase
- django
- 도커
- DjangoRestFramework
- EC2
- database
- DRF
- Continuous Delivery
- DjangoCache
- Prefetch_related
- Python
- Transaction
- CD
- aggregate
- nestedfunction
- Coroutine
- dry-yasg
- 코루틴
- testcase
- Git
- QuerySet
- CI
- racecondition
- annotate
- 백준
- Continuous Deployment
- F객체
- docker
- aws
- to_attr
Archives
- Today
- Total
BackEnd King KY
TIL41 - psycopg2-binary 2.8.6 버전 설치 시 발생했던 에러 본문
728x90

psycopg2-binary 2.8.6 버전 설치 시 발생했던 에러
어떻게 이름을 써야할 지 몰라 제목을 이렇게 쓰게 되었습니다.
문제
FastAPI 프로젝트를 위해 psycopg2-binary를 설치하는데, 2.8.6 버전으로 설치하려고 하니 에러가 발생했습니다
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> psycopg2-binary
해결
우선, Postgresql 설치(했다면 스킵)
brew install postgresql
파이썬 버전 확인
python --version
-> Python 3.9.4
아래 명령어 적용
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib -L${HOME}/.pyenv/versions/3.9.4/lib"
다시 설치
pip install psycopg2-binary==2.8.6
'FastAPI' 카테고리의 다른 글
TIL44 - SQLAlchemy에서 Django select_related 구현 (0) | 2023.02.12 |
---|