PHP8.1安装报错configure: error: iconv does not support errno的解决方法

涂红伟, 2022年12月20日 21:05:01

服务器系统为Debian11.3,安装php8.1失败,提示 configure: error: iconv does not support errno, make: *** No targets specified and no makefile found.  Stop. make: *** No rule to make target 'install'.  Stop. PHP install failed, Killed Please Contact the author!  详细代码如下:

Configuring extensions
checking for io.h... no
checking for strtoll... yes
checking for atoll... yes
checking whether to build with LIBXML support... yes
checking for libxml-2.0 >= 2.9.0... yes
checking for OpenSSL support... yes
checking for Kerberos support... no
checking whether to use system default cipher list instead of hardcoded value... no
checking for openssl >= 1.0.2... yes
checking for RAND_egd... no
checking for PCRE library to use... bundled
checking whether to enable PCRE JIT functionality... yes
checking whether Intel CET is enabled... no
checking whether to enable the SQLite3 extension... yes
checking for sqlite3 >= 3.7.7... yes
checking for sqlite3_errstr in -lsqlite3... yes
checking for sqlite3_expanded_sql in -lsqlite3... yes
checking for sqlite3_load_extension in -lsqlite3... yes
checking for ZLIB support... yes
checking for zlib >= 1.2.0.4... yes
checking whether to enable bc style precision math functions... yes
checking for BZip2 support... no
checking whether to enable calendar conversion support... no
checking whether to enable ctype functions... yes
checking for cURL support... yes
checking for libcurl >= 7.29.0... yes
checking for SSL support in libcurl... yes
checking for libcurl linked against old openssl... no
checking for curl_easy_perform in -lcurl... yes
checking for QDBM support... no
checking for GDBM support... no
checking for NDBM support... no
checking for TCADB support... no
checking for LMDB support... no
checking for Berkeley DB4 support... no
checking for Berkeley DB3 support... no
checking for Berkeley DB2 support... no
checking for DB1 support... no
checking for DBM support... no
checking for CDB support... no
checking for INI File support... no
checking for FlatFile support... no
checking whether to enable DBA interface... no
checking whether to enable DOM support... yes
checking for libxml-2.0 >= 2.9.0... yes
checking whether to build with Enchant support... no
checking whether to enable EXIF (metadata from images) support... yes
checking for FFI support... no
checking for fileinfo support... no
checking whether to enable input filter support... yes
checking whether to enable FTP support... yes
checking whether to explicitly enable FTP SSL support... no
checking for openssl >= 1.0.2... yes
checking for GD support... yes
checking for external libgd... no
checking for libavif... no
checking for libwebp... no
checking for libjpeg... yes
checking for libXpm... no
checking for FreeType 2... yes
checking whether to enable JIS-mapped Japanese font support in GD... no
checking for fabsf... yes
checking for floorf... yes
checking for zlib... yes
checking for libpng... yes
checking for libjpeg... yes
checking for freetype2... yes
checking for GNU gettext support... yes
checking for bindtextdomain in -lintl... no
checking for bindtextdomain in -lc... yes
checking for ngettext in -lc... yes
checking for dngettext in -lc... yes
checking for dcngettext in -lc... yes
checking for bind_textdomain_codeset in -lc... yes
checking for GNU MP support... no
checking for mhash support... yes
checking size of long... (cached) 8
checking if we're at 64-bit platform... yes
checking for iconv support... yes
checking for libiconv in -liconv... yes
checking if iconv is glibc's... yes
checking if iconv supports errno... no
configure: error: iconv does not support errno
make: *** No targets specified and no makefile found.  Stop.
make: *** No rule to make target 'install'.  Stop.
PHP install failed, Please Contact the author!
Killed
Image
PHP8.1安装报错configure: error: iconv does not support errno的解决方法

从错误提示可以看出是iconv导致,在 php.net 上找到解决方法:

# cd /usr/local/src/
# wget https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.16.tar.gz
# tar zxvf ./libiconv-1.16.tar.gz
# cd libiconv-1.16
# ./configure --prefix=/usr
# make & make install

通过以上命令安装完libiconv,再安装PHP就没有问题了。

https://bugs.php.net/bug.php?id=80585

标签