依赖包安装:
apt-get install -y libsodium-dev libonig-dev libsqlite3-dev libcurl4-openssl-dev libwebp-dev libvpx-dev libxslt1-dev
apt-get install libxml2-dev libjpeg-dev libpng-dev libxpm-dev libfreetype6-dev libmcrypt-dev -y
php编译:
./configure --prefix=/sxws/srv/php/72--with-config-file-path=/sxws/srv/php/72/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl=/usr/local/curl --enable-mbregex --enable-mbstring --enable-intl --enable-pcntl --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl=/usr/local/openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-webp-dir=/usr --with-mcrypt
报错如下:
解决方法:
方法1、网上大多说安装依赖包 libfreetype6-dev,本人安装了确依旧失败;
apt-get -y install libfreetype6-dev
# 编译php的时候依旧报错
方法2、安装freetype,亲测有效;
参考:https://blog.csdn.net/qq_37674858/article/details/81085848
cd /usr/local/src/
wget http://download.savannah.gnu.org/releases/freetype/freetype-2.4.10.tar.gz
tar zxvf freetype-2.4.10.tar.gz
cd freetype-2.4.10
./configure --prefix=/usr/local/freetype
make && make install
第二种方式 安装freetype后编译PHP成功。
Ubuntu 20.04 LTS编译安装PHP7.2 报错 configure: error: freetype-config not found
Ubuntu 20.04 LTS编译安装PHP7.2 报错 configure: error: freetype-config not found
上一篇:
php如何查询数据库是否存在
下一篇:
没有下一篇了
2141
2021-04-25
JavaScript >>
- Ueditor上传注意事项 09-17
- JavaScript生成树形菜 07-11
- JS判断数据类型 06-30
- js判断当前页面在移动设备还是 05-16
- 前端跨域的整理 09-23
Linux >>
- manjaro编译安装PHP7 07-07
- svn命令行 批量添加(add 05-12
- centos 编译PHP7.2 04-25
- Linux下SVN创建仓库 04-19
- linux tmux基本操作 06-30
PHP >>
- Ubuntu 20.04 LT 04-25
- php如何查询数据库是否存在 12-10
- php执行SQL文件, 分割s 12-07
- netBeans 修改新建ph 09-21
- Failed to read 07-11
HTML/CSS >>
- 前端性能优化 —— 移动端浏览 02-02
- 编写优秀 CSS 代码的 8 02-02
- 助你再次理清CSS选择器 09-16
C/C++ >>
- qt5.9.+源码编译-vs2 08-18
- QT Creator 常用快捷 06-04
- QML方形图片处理为圆形图片方 05-31
- Windows Socket编 04-03
MySql >>
- 必备 SQL 查询优化技巧,提 02-02
- 玩转MySQL数据库,SQL命 10-26
- Mysql主从同步实战 09-16
- 10个提升MySQL性能的小技 08-09
- MySql获取某个字段存在于哪 08-05
常用工具使用 >>
- 如何利用SVN的Branche 10-20
- 从SVN导出指定版本号之间修改 10-20