IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> PHP知识库 -> php容器下安装gd库 -> 正文阅读

[PHP知识库]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/something

Possible 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 zip

Some 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 bundled
? ? ? ? ? ? ? ? ? ? ? ? ? libgd)
? --enable-gd-jis-conv ? ?GD: Enable JIS-mapped Japanese font support (only
? ? ? ? ? ? ? ? ? ? ? ? ? for bundled libgd)
? --enable-shared=PKGS ? ?Build shared libraries default=yes
? --enable-static=PKGS ? ?Build static libraries default=yes
? --enable-fast-install=PKGS
? ? ? ? ? ? ? ? ? ? ? ? ? Optimize 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 automatic


Some influential environment variables:
? PKG_CONFIG ?path to pkg-config utility
? PKG_CONFIG_PATH
? ? ? ? ? ? ? directories to add to pkg-config's search path
? PKG_CONFIG_LIBDIR
? ? ? ? ? ? ? path overriding pkg-config's built-in search path
? CC ? ? ? ? ?C compiler command
? CFLAGS ? ? ?C compiler flags
? LDFLAGS ? ? linker flags, e.g. -L<lib dir> if you have libraries in a
? ? ? ? ? ? ? nonstandard 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> if
? ? ? ? ? ? ? you have headers in a nonstandard directory <include dir>
? CPP ? ? ? ? C preprocessor
? ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config
? ZLIB_LIBS ? linker flags for ZLIB, overriding pkg-config
? PNG_CFLAGS ?C compiler flags for PNG, overriding pkg-config
? PNG_LIBS ? ?linker flags for PNG, overriding pkg-config
? WEBP_CFLAGS C compiler flags for WEBP, overriding pkg-config
? WEBP_LIBS ? linker flags for WEBP, overriding pkg-config
? JPEG_CFLAGS C compiler flags for JPEG, overriding pkg-config
? JPEG_LIBS ? linker flags for JPEG, overriding pkg-config
? XPM_CFLAGS ?C compiler flags for XPM, overriding pkg-config
? XPM_LIBS ? ?linker flags for XPM, overriding pkg-config
? FREETYPE2_CFLAGS
? ? ? ? ? ? ? C compiler flags for FREETYPE2, overriding pkg-config
? FREETYPE2_LIBS
? ? ? ? ? ? ? linker flags for FREETYPE2, overriding pkg-config
? GDLIB_CFLAGS
? ? ? ? ? ? ? C compiler flags for GDLIB, overriding pkg-config
? GDLIB_LIBS ?linker flags for GDLIB, overriding pkg-config

Use 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知识库 最新文章
Laravel 下实现 Google 2fa 验证
UUCTF WP
DASCTF10月 web
XAMPP任意命令执行提升权限漏洞(CVE-2020-
[GYCTF2020]Easyphp
iwebsec靶场 代码执行关卡通关笔记
多个线程同步执行,多个线程依次执行,多个
php 没事记录下常用方法 (TP5.1)
php之jwt
2021-09-18
上一篇文章      下一篇文章      查看所有文章
加:2021-07-17 11:41:01  更:2021-07-17 11:42:09 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年4日历 -2024/4/27 19:54:24-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码