오류: 명령 오류, 종료 상태는 1입니다.

오류: 명령 오류, 종료 상태는 1입니다.

다음을 사용하여 파이게임을 설치해 보세요.pip3 파이게임 설치Ubuntu 20.04에서 오류가 발생했습니다. 어떤 종류의 도움을 주셔서 감사합니다

내 오류는 다음과 같습니다

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-9w9lq7il/pygame/setup.py'"'"'; file='"'"'/tmp/pip-install-9w9lq7il/pygame/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-9w9lq7il/pygame/pip-egg-info
         cwd: /tmp/pip-install-9w9lq7il/pygame/
    Complete output (29 lines):
    
    
    WARNING, No "Setup" File Exists, Running "buildconfig/config.py"
    Using UNIX configuration...
    
    /bin/sh: 1: sdl-config: not found
    /bin/sh: 1: sdl-config: not found
    /bin/sh: 1: sdl-config: not found
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    Package freetype2 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `freetype2.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'freetype2' found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    /bin/sh: 1: freetype-config: not found
    
    Hunting dependencies...
    WARNING: "sdl-config" failed!
    WARNING: "pkg-config freetype2" failed!
    WARNING: "freetype-config" failed!
    Unable to run "sdl-config". Please make sure a development version of SDL is installed.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

답변1

sudo apt install libfreetype-dev libdsl2-dev

답변2

Pip은 구체적으로 다음과 같이 불평했습니다.

/bin/sh: 1: sdl-config: not found

그리고

No package 'freetype2' found
/bin/sh: 1: freetype-config: not found

그럼 그 사람들은 어디에 있나요? Google 검색을 사용해 볼 수 있지만 apt-file아직 설치하지 않은 경우 설치할 수도 있습니다 .

sudo apt install apt-file

그런 다음 이를 사용하여 손실된 파일을 찾습니다. 예를 들어:

apt-file search "sdl-config"
apt-file search "freetype-config"

libfreetype-dev및 를 설치해야 함을 알 수 있습니다 libdsl2-dev.

관련 정보