Browsing this Thread:   1 Anonymous Users






ubuntu 20.04 php7.2
#1
Not too shy to talk
Not too shy to talk


See User information
ubuntu 20.04 php7.2

export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/

./configure --prefix=/usr/local/php72 --with-config-file-path=/usr/local/php72/etc --with-pdo-mysql --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-zlib --with-bz2 --with-curl --with-libxml-dir --with-mhash --enable-mbstring --enable-xml --enable-sockets --enable-zip --enable-bcmath

make && make install


cd ext/gd

/usr/local/php552/bin/phpize

./configure --with-php-config=/usr/local/php72/bin/php-config --with-jpeg-dir --with-png-dir --with-freetype-dir --with-webp-dir

Makefile line 32

CPPFLAGS = -I/usr/include/freetype2/ -DHAVE_CONFIG_H

make && make install

我在编译安装 PHP 时,遇到了 “freetype-config not found”的问题。
主要的思路就是用pkg-config代替freetype-config

sed -i "s/freetype-config/pkg-config/g" ./configure
sed -i "s/freetype-config/pkg-config/g" ./config.m4
sed -i "s/FREETYPE2_CONFIG --cflags/FREETYPE2_CONFIG freetype2 --cflags/g" ./configure
sed -i "s/FREETYPE2_CONFIG --libs/FREETYPE2_CONFIG freetype2 --cflags/g" ./configure

Posted on: 9/30 6:00

Edited by eyex on 2020/9/30 6:51:32
Top








Themes

(2 themes)
Login
Username:

Password:


Lost Password?
Register now!
Categories