pip를 사용하여 Mavericks에 PIL을 설치하고 싶지만이 오류가 발생합니다.
_imagingft.c:73:10: fatal error: 'freetype/fterrors.h' file not found
#include <freetype/fterrors.h>
^
1 error generated.
error: command 'cc' failed with exit status 1
내 명령 줄 도구가 설치되어 있고 최신 상태이며 찾은 모든 힌트가 도움이되지 않았습니다. 컴파일하려면 어떻게해야합니까?
편집 : 방금 확인했는데 freetype도 이미 homebrew를 통해 설치되었습니다.
답변
freetype2의 특정 버전에 심볼릭 링크하는 대신 다음을 수행하십시오.
ln -s /usr/local/include/freetype2 /usr/local/include/freetype
이렇게하면 freetype2를 업그레이드 할 때마다 심볼릭 링크를 다시 만드는 수고를 덜 수 있습니다.
답변
macports를 사용하면 나를 위해 일한 솔루션 :
sudo port install freetype
sudo ln -s /opt/local/include/freetype2 /opt/local/include/freetype
그런 다음 PIL 빌드 프로세스를 다시 실행하십시오.
답변
이 심볼릭 링크로이 문제를 해결했습니다.
ln -s /usr/local/Cellar/freetype/2.5.1/include/freetype2 /usr/local/include/freetype
나는 이미 homebrew를 통해 freetype을 설치했습니다.
답변
이는 freetype> = 2.1.5의 헤더 변경으로 인해 발생합니다. PIL은 freetype 헤더를 포함하는 올바른 문서화 된 방법을 사용하지 않습니다. 이로 인해 freetype이 마침내 오랫동안 사용되지 않는 헤더를 포함하는 방법을 제거했기 때문에 빌드가 실패합니다. 이 문제는 http://freetype.sourceforge.net/freetype2/docs/tutorial/step1.html 상단에 바로 문서화되어 있습니다 .
참고 : FreeType 2.1.6부터는 이전 헤더 파일 포함 체계가 더 이상 지원되지 않습니다. 즉, 다음과 같은 작업을 수행하면 이제 오류가 발생합니다.
#include <freetype / freetype.h>
#include <freetype / ftglyph.h>
이 문제를 PIL 개발자에게 업스트림으로 가져 가서 freetype 헤더를 포함하는 문서화 된 방법을 사용하도록 조언하십시오.
#include <ft2build.h>
#include FT_ERRORS_H
