xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

samnaka·2021년 5월 13일
0

패키지를 설치하려고 하니 에러가 떴다.
가상 환경, .lock 모두 지웠다가 다시 설치하고 패키지 버전도 바꿔봤으나 계속 실패했다. 로그를 보니 원인은 xcode 때문이었다
터미널에서 아래 명령어로 설치
xcode-select --install

poetry add redislite
Using version ^6.0.674960 for redislite

Updating dependencies
Resolving dependencies... (0.6s)

Package operations: 1 install, 0 updates, 0 removals

  • Installing redislite (6.0.674960): Failed

  EnvCommandError

  Command ['/Users/src/venv/bin/pip', 'install', '--no-deps', 'file:///Users/Library/Caches/pypoetry/artifacts/5b/a8/f3/18146f307000523665087bc3abb79b88891c913a5f9254f27cd69def18/redislite-6.0.674960.tar.gz'] errored with the following return code 1, and output: 
  Processing /Users/Library/Caches/pypoetry/artifacts/5b/a8/f3/18146f307000523665087bc3abb79b88891c913a5f9254f27cd69def18/redislite-6.0.674960.tar.gz
  Building wheels for collected packages: redislite
    Building wheel for redislite (setup.py): started
    Building wheel for redislite (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /Users/src/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/setup.py'"'"'; __file__='"'"'/private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-wheel-5jinwb1b
         cwd: /private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/
    Complete output (32 lines):
    running bdist_wheel
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.9-x86_64-3.8
    creating build/lib.macosx-10.9-x86_64-3.8/redislite
    copying redislite/patch.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
    copying redislite/configuration.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
    copying redislite/client.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
    copying redislite/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
    copying redislite/debug.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
    running egg_info
    writing redislite.egg-info/PKG-INFO
    writing dependency_links to redislite.egg-info/dependency_links.txt
    writing requirements to redislite.egg-info/requires.txt
    writing top-level names to redislite.egg-info/top_level.txt
    warning: the 'license_file' option is deprecated, use 'license_files' instead
    adding license file 'LICENSE.txt' (matched pattern 'LICENSE.txt')
    reading manifest file 'redislite.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'README.rst'
    warning: no files found matching '*' under directory 'redislite/bin'
    warning: no previously-included files found matching '*dummy.o'
    writing manifest file 'redislite.egg-info/SOURCES.txt'
    copying redislite/package_metadata.json -> build/lib.macosx-10.9-x86_64-3.8/redislite
    running build_ext
    building 'dummy' extension
    creating build/temp.macosx-10.9-x86_64-3.8
    creating build/temp.macosx-10.9-x86_64-3.8/src
    gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I/Users/src/venv/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/dummy.c -o build/temp.macosx-10.9-x86_64-3.8/src/dummy.o
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
    ERROR: Failed building wheel for redislite
    Running setup.py clean for redislite
  Failed to build redislite
  Installing collected packages: redislite
      Running setup.py install for redislite: started
      Running setup.py install for redislite: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /Users/src/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/setup.py'"'"'; __file__='"'"'/private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-record-5ydjre_f/install-record.txt --single-version-externally-managed --compile --install-headers /Users/src/venv/include/site/python3.8/redislite
           cwd: /private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/
      Complete output (32 lines):
      running install
      running build
      running build_py
      creating build
      creating build/lib.macosx-10.9-x86_64-3.8
      creating build/lib.macosx-10.9-x86_64-3.8/redislite
      copying redislite/patch.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
      copying redislite/configuration.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
      copying redislite/client.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
      copying redislite/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
      copying redislite/debug.py -> build/lib.macosx-10.9-x86_64-3.8/redislite
      running egg_info
      writing redislite.egg-info/PKG-INFO
      writing dependency_links to redislite.egg-info/dependency_links.txt
      writing requirements to redislite.egg-info/requires.txt
      writing top-level names to redislite.egg-info/top_level.txt
      warning: the 'license_file' option is deprecated, use 'license_files' instead
      adding license file 'LICENSE.txt' (matched pattern 'LICENSE.txt')
      reading manifest file 'redislite.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching 'README.rst'
      warning: no files found matching '*' under directory 'redislite/bin'
      warning: no previously-included files found matching '*dummy.o'
      writing manifest file 'redislite.egg-info/SOURCES.txt'
      copying redislite/package_metadata.json -> build/lib.macosx-10.9-x86_64-3.8/redislite
      running build_ext
      building 'dummy' extension
      creating build/temp.macosx-10.9-x86_64-3.8
      creating build/temp.macosx-10.9-x86_64-3.8/src
      gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/usr/local/opt/openssl@1.1/include -I/Users/src/venv/include -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c src/dummy.c -o build/temp.macosx-10.9-x86_64-3.8/src/dummy.o
      xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /Users/src/venv/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/setup.py'"'"'; __file__='"'"'/private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-req-build-6k8b0o1m/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/47/18898njs0qjdcnp9rf0ly0r80000gn/T/pip-record-5ydjre_f/install-record.txt --single-version-externally-managed --compile --install-headers /Users/src/venv/include/site/python3.8/redislite Check the logs for full command output.
  

  at venv/lib/python3.8/site-packages/poetry/utils/env.py:1075 in _run
      1071│                 output = subprocess.check_output(
      1072│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1073)
      1074│         except CalledProcessError as e:
    → 1075│             raise EnvCommandError(e, input=input_)
      10761077return decode(output)
      10781079│     def execute(self, bin, *args, **kwargs):


Failed to add packages, reverting the pyproject.toml file to its original content.
profile
서버 개발, 투자, 운동, 부자 되고 싶다

0개의 댓글