php容器下安装gd库
参考文章:https://blog.csdn.net/bbwangj/article/details/81474915
当前环境:arm64v8/php:7.4.14-fpm
进入php容器执行以下步骤# 安装所需依赖
root@80d3844c2bb7:/var/www/html# apt-get install -y \libfreetype6-dev \libjpeg62-turbo-dev \libmcrypt-dev \libpng-dev # 查看freetype2库目录
root@80d3844c2bb7:/var/www/html# ls /usr/include/freetype2/
freetype ft2build.h# 配置gd库编译项
root@80d3844c2bb7:/var/www/html# docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/# 安装gd库
root@80d3844c2bb7:/var/www/html# docker-php-ext-install gd# 使用gd库扩展
root@80d3844c2bb7:/var/www/html# docker-php-ext-enable gd
docker-php-ext-configure --help
root@80d3844c2bb7:/var/www/html# docker-php-ext-configure --help
usage: /usr/local/bin/docker-php-ext-configure ext-name [configure flags]ie: /usr/local/bin/docker-php-ext-configure gd --with-jpeg-dir=/usr/local/somethingPossible values for ext-name:
bcmath bz2 calendar ctype curl dba dom enchant exif ffi fileinfo filter ftp gd gettext gmp hash iconv imap intl json ldap mbstring mysqli oci8 odbc opcache pcntl pdo pdo_dblib pdo_firebird pdo_mysql pdo_oci pdo_odbc pdo_pgsql pdo_sqlite pgsql phar posix pspell readline reflection session shmop simplexml snmp soap sockets sodium spl standard sysvmsg sysvsem sysvshm tidy tokenizer xml xmlreader xmlrpc xmlwriter xsl zend_test zipSome of the above modules are already compiled into PHP; please check
the output of "php -i" to see which modules are already loaded.
docker-php-ext-configure gd --help
root@80d3844c2bb7:/var/www/html# docker-php-ext-configure gd --help
Configuring for:
PHP Api Version: 20190902
Zend Module Api No: 20190902
Zend Extension Api No: 320190902
`configure' configures this package to adapt to many kinds of systems.Usage: ./configure [OPTION]... [VAR=VALUE]...To assign environment variables (e.g., CC, CFLAGS...), specify them as
VAR=VALUE. See below for descriptions of some of the useful variables.Defaults for the options are specified in brackets.Configuration:-h, --help display this help and exit--help=short display options specific to this package--help=recursive display the short help of all the included packages-V, --version display version information and exit-q, --quiet, --silent do not print `checking ...' messages--cache-file=FILE cache test results in FILE [disabled]-C, --config-cache alias for `--cache-file=config.cache'-n, --no-create do not create output files--srcdir=DIR find the sources in DIR [configure dir or `..']Installation directories:--prefix=PREFIX install architecture-independent files in PREFIX[/usr/local]--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX[PREFIX]By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.For better control, use the options below.Fine tuning of the installation directories:--bindir=DIR user executables [EPREFIX/bin]--sbindir=DIR system admin executables [EPREFIX/sbin]--libexecdir=DIR program executables [EPREFIX/libexec]--sysconfdir=DIR read-only single-machine data [PREFIX/etc]--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]--localstatedir=DIR modifiable single-machine data [PREFIX/var]--runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]--libdir=DIR object code libraries [EPREFIX/lib]--includedir=DIR C header files [PREFIX/include]--oldincludedir=DIR C header files for non-gcc [/usr/include]--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]--datadir=DIR read-only architecture-independent data [DATAROOTDIR]--infodir=DIR info documentation [DATAROOTDIR/info]--localedir=DIR locale-dependent data [DATAROOTDIR/locale]--mandir=DIR man documentation [DATAROOTDIR/man]--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]--htmldir=DIR html documentation [DOCDIR]--dvidir=DIR dvi documentation [DOCDIR]--pdfdir=DIR pdf documentation [DOCDIR]--psdir=DIR ps documentation [DOCDIR]System types:--build=BUILD configure for building on BUILD [guessed]--host=HOST cross-compile to build programs to run on HOST [BUILD]--target=TARGET configure for building compilers for TARGET [HOST]Optional Features and Packages:--disable-option-checking ignore unrecognized --enable/--with options--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)--enable-FEATURE[=ARG] include FEATURE [ARG=yes]--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)--with-libdir=NAME Look for libraries in .../NAME rather than .../lib--with-php-config=PATH Path to php-config [php-config]--enable-gd Include GD support--with-external-gd Use external libgd--with-webp GD: Enable WEBP support (only for bundled libgd)--with-jpeg GD: Enable JPEG support (only for bundled libgd)--with-xpm GD: Enable XPM support (only for bundled libgd)--with-freetype GD: Enable FreeType 2 support (only for bundledlibgd)--enable-gd-jis-conv GD: Enable JIS-mapped Japanese font support (onlyfor bundled libgd)--enable-shared=PKGS Build shared libraries default=yes--enable-static=PKGS Build static libraries default=yes--enable-fast-install=PKGSOptimize for fast installation default=yes--with-gnu-ld Assume the C compiler uses GNU ld default=no--disable-libtool-lock Avoid locking (might break parallel builds)--with-pic Try to use only PIC/non-PIC objects default=use both--with-tags=TAGS Include additional configurations automaticSome influential environment variables:PKG_CONFIG path to pkg-config utilityPKG_CONFIG_PATHdirectories to add to pkg-config's search pathPKG_CONFIG_LIBDIRpath overriding pkg-config's built-in search pathCC C compiler commandCFLAGS C compiler flagsLDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in anonstandard directory <lib dir>LIBS libraries to pass to the linker, e.g. -l<library>CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> ifyou have headers in a nonstandard directory <include dir>CPP C preprocessorZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-configZLIB_LIBS linker flags for ZLIB, overriding pkg-configPNG_CFLAGS C compiler flags for PNG, overriding pkg-configPNG_LIBS linker flags for PNG, overriding pkg-configWEBP_CFLAGS C compiler flags for WEBP, overriding pkg-configWEBP_LIBS linker flags for WEBP, overriding pkg-configJPEG_CFLAGS C compiler flags for JPEG, overriding pkg-configJPEG_LIBS linker flags for JPEG, overriding pkg-configXPM_CFLAGS C compiler flags for XPM, overriding pkg-configXPM_LIBS linker flags for XPM, overriding pkg-configFREETYPE2_CFLAGSC compiler flags for FREETYPE2, overriding pkg-configFREETYPE2_LIBSlinker flags for FREETYPE2, overriding pkg-configGDLIB_CFLAGSC compiler flags for GDLIB, overriding pkg-configGDLIB_LIBS linker flags for GDLIB, overriding pkg-configUse these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.Report bugs to the package provider.
php容器下安装gd库相关推荐
- mac php gd库,mac下安装GD库FreeType
MacBook Pro安装的新系统10.10.3,PHP环境也是默认就有的,GD库在默认情况下也安装过了,但在使用验证码的时候,提示GD库不支持FreeType,这里我们手动安装一下. 法一: 安装 ...
- docker容器php 安装GD库
容器内运行 apt-get update apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev docker-php-e ...
- docker php gd png.h,docker php 容器安装GD库
用thinkphp 5 Image库,创建缩略图报错:Call to undefined function imagecreatefromjpeg(),度娘一下发现是php 环境没有配置GD库扩展,因 ...
- docker php安装gd扩展_docker php 容器安装GD库
用thinkphp 5 Image库,创建缩略图报错:Call to undefined function imagecreatefromjpeg(),度娘一下发现是php 环境没有配置GD库扩展,因 ...
- centos php yum gd库,Centos7下PHP安装gd库的实例讲解
Centos7下安装php, 或php的gd库支持,都是很简单的. 一切通过yum搞定. yum install php-gd 以上命令就搞定php-gd的支持,快快看看phpinfo是否支持了? 可 ...
- Centos安装GD库
tar zxvf ncurses-5.6.tar.gz 进入目录 cd ncurses-5.6 生成 makefile文件, 再进一步编译 ./configure --prefix=/usr --wi ...
- 烂泥:centos单独编译安装gd库
本文首发于烂泥行天下. 这几天一直在弄一个商城系统,该系统的源码及数据库都已经上传并创建完毕.但是在安装该系统时,却提示缺少gd库.如下: 使用php探针查看,发现php确实没有安装gd库.如下: 目 ...
- boost linux 测试程序,Linux平台下安装 boost 库
Linux平台下安装boost库 今天在给师弟们设计新一代软件框架的时候,需要实现一种功能:存在一种容器,里面存放着不同的数据类型,例如int, double, char,以及一些自己定义的类等等.后 ...
- 发帖添加作者水印插件无法发帖问题-缺少GD库支持,php如何安装gd库-一颗优雅草科技伊凡
发帖添加作者水印插件无法发帖问题-缺少GD库支持,缺少发帖会报错 php如何安装gd库: 宝塔 也可以点击进入终端 执行 Linux系统直接安装: yum install php-gd* #适用于32 ...
- centos php gd库,Centos安装GD库
tar zxvf ncurses-5.6.tar.gz 进入目录 cd ncurses-5.6 生成 makefile文件, 再进一步编译 ./configure --prefix=/usr --wi ...
最新文章
- 未能添加对***.dll的引用 问题解决方法
- xampp mysqli_query and后的条件不行_Java笔记不用!null作为判空条件
- python定义一个矩形类_创建矩形类
- Day18 (一)类的加载器
- java servlet获取url参数_Java Servlet如何获取请求的参数值?
- android 坐标绘图 缩放,在缩放/缩小或拖放到Android后获取画布坐标
- VS2013在Release情况下使用vector有时候会崩溃的一个可能原因
- ATL之深入浅出书评(转)
- linux内核C -- 第10课:内联函数探究
- C/C++_宏定义神仙级用法 实现枚举字符串互转
- java 编译单个文件_单独Java文件的通用快速编译方法
- python open r/rb
- 【JAVA基础速过】第3章 数组+Arrays工具类的使用
- 域名泛解析,二级域名转向问题- -完美解决
- iOS App Security and Analysis: Part 1/2
- 物联网开发笔记(63)- 使用Micropython开发ESP32开发板之控制ILI9341 3.2寸TFT-LCD触摸屏进行LVGL图形化编程:显示中文
- 人对光波的三种特性_光线的三种特性——玩转光线的基础知识
- 太阳能电池板原理及工作原理
- micropython教程下载_python教程之让micro:bit讲话
- Gin + gRPC双向流模式 + sse实现grpc客户端到前端界面的消息推送