
Elastic beanstalk PHP용 Amazon Linux 2에는 내 프로젝트에 맞는 글꼴을 렌더링하지 않는 freetype 2.3.11이 함께 제공되므로 freetype 2.10.1을 다운로드하고 다음에 따라 harfbuzz 없이/포함하여 빌드했습니다.http://www.linuxfromscratch.org/blfs/view/svn/general/freetype2.html. 그런 다음 PHP gd 확장을 다음과 같이 컴파일했습니다.
cd php-7.2.19/ext/gd
phpize
./configure --with-php-config=/usr/bin/php-config --with-gd --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --with-webp-dir=/usr
make
sudo cp modules/gd.so /usr/lib64/php/7.2/modules/
하지만 php -v를 실행하면 "PHP 경고: PHP 시작: 동적 라이브러리 'gd.so'를 로드할 수 없습니다(시도: /usr/lib64/php/7.2/modules/gd.so (/usr/lib64/php) /7.2/modules/gd.so: 정의되지 않은 기호: php_gd_gdImageJpegCtx), /usr/lib64/php/7.2/modules/gd.so.so (/usr/lib64/php/7.2/modules/gd.so.so: 불가능 공유 객체 파일 열기: 해당 파일이나 디렉터리가 없음)) 0행에 알 수 없음"
답변1
구성 명령에서 --with-jpeg-dir=/usr이 누락되었습니다. 나는 그런 것이 잘못되었다면 컴파일되지 않았을 것이라고 생각했지만 그렇지 않은 것 같습니다. 이제 작동합니다.
$ php -i | grep -i "freetype"
FreeType Support => enabled
FreeType Linkage => with freetype
FreeType Version => 2.10.1