맥 brew python 설치 오류 Error: An unexpected error occurred during the `brew link` step
맥(Mac) 자체적으로 파이썬 2.7.x 버전이 설치되어 있었고 3버전의 필요성을 느끼게 되었다.
Homebrew를 통해 최신 python을 설치하려 했으나 오류가 발생했다.
'brew install python'
[] ~ brew install python Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> Updated Formulae daemontools ..... ==> Installing dependencies for python@3.8: gdbm, openssl@1.1, readline, sqlite and xz ==> Installing python@3.8 dependency: gdbm ==> Pouring gdbm-1.18.1.catalina.bottle.1.tar.gz 🍺 /usr/local/Cellar/gdbm/1.18.1: 20 files, 602.8KB ==> Installing python@3.8 dependency: openssl@1.1 ..... ==> Summary 🍺 /usr/local/Cellar/sqlite/3.32.3: 11 files, 4MB ==> Installing python@3.8 dependency: xz ==> Pouring xz-5.2.5.catalina.bottle.tar.gz 🍺 /usr/local/Cellar/xz/5.2.5: 92 files, 1.1MB ==> Installing python@3.8 ==> Pouring python@3.8-3.8.4.catalina.bottle.tar.gz Error: An unexpected error occurred during the `brew link` step The formula built, but is not symlinked into /usr/local Permission denied @ dir_s_mkdir - /usr/local/Frameworks Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks
문제를 확인하기 위해 'brew doctor' 입력해 보니 3.8.4 버전이 설치는 되었으나 위 오류내용 대로 권한 문제로 인해 심볼릭 링크가 생성되지 않은 것으로 판단되었다.
[] ~ brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an issue. If everything you use Homebrew for is working fine: please don't worry or file an issue; just ignore this. Thanks! Warning: Some installed formulae were deleted! You should find replacements for the following formulae: sshpass Warning: The following directories do not exist: /usr/local/Frameworks You should create these directories and change their ownership to your account. sudo mkdir -p /usr/local/Frameworks sudo chown -R $(whoami) /usr/local/Frameworks Warning: You have unlinked kegs in your Cellar. Leaving kegs unlinked can lead to build-trouble and cause brews that depend on those kegs to fail to run properly once built. Run `brew link` on these: gettext python@3.8
실제로 python3을 입력 후 XCode 개발 간 설치한 python 3.7이 해당 경로를 잡고 있었다.
[] ~ python3 xcode-select: Failed to locate 'python3', requesting installation of command line developer tools.
'brew link python3' 로 새로 설치한 python3 링크를 재설정 후 'python3' 을 입력해 링크 후 정상 실행 여부를 확인했다.
(Frameworks의 경우 XCode 재설치 시 영향이 있는 부분이므로 일단 PASS)
[] ~ brew link python3 Linking /usr/local/Cellar/python@3.8/3.8.4... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks [] ~ python3 Python 3.8.4 (default, Jul 14 2020, 02:58:48) [Clang 11.0.3 (clang-1103.0.32.62)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
댓글을 사용할 수 없습니다.