phpize Imagick 构建失败:缺少函数

phpize Imagick 构建失败:缺少函数

我正在尝试在运行 php 7.4 的 Debian 10 服务器上安装 Imagick,但我的系统似乎缺少某些功能。

我安装了sudo apt install php7.4-dev

PEAR Version: 1.10.12
PHP Version: 7.4.11
Zend Engine Version: 3.4.0
Running on: Linux 4.19.0-11-amd64 #1 SMP Debian 4.19.146-1 (2020-09-17) x86_64

phpize7.4 -v
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902

Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster

这是sudo pecl install imagick

downloading imagick-3.4.4.tgz ...
Starting to download imagick-3.4.4.tgz (253,434 bytes)
.....................................................done: 253,434 bytes
19 source files, building
running: phpize
Configuring for:
PHP Api Version:         20190902
Zend Module Api No:      20190902
Zend Extension Api No:   320190902
configure.ac:161: warning: LTOPTIONS_VERSION is m4_require'd but not m4_defun'd
build/libtool.m4:61: LT_INIT is expanded from...
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: LTSUGAR_VERSION is m4_require'd but not m4_defun'd
build/libtool.m4:61: LT_INIT is expanded from...
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: LTVERSION_VERSION is m4_require'd but not m4_defun'd
build/libtool.m4:61: LT_INIT is expanded from...
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure.ac:161: warning: LTOBSOLETE_VERSION is m4_require'd but not m4_defun'd
build/libtool.m4:61: LT_INIT is expanded from...
build/libtool.m4:99: AC_PROG_LIBTOOL is expanded from...
configure.ac:161: the top level
configure:4702: error: possibly undefined macro: m4_ifval
  If this token and others are legitimate, please use m4_pattern_allow.
  See the Autoconf documentation.
configure:8297: error: possibly undefined macro: _LT_SET_OPTIONS
configure:8297: error: possibly undefined macro: LT_INIT
ERROR: `phpize' failed

这是我的/usr/share/libtool/configure.ac

## ------------------------ ##
## Autoconf initialisation. ##
## ------------------------ ##
AC_INIT([libltdl], [2.4.3a], [[email protected]])
AC_CONFIG_HEADERS([config.h:config-h.in])
AC_CONFIG_SRCDIR([ltdl.c])
AC_CONFIG_AUX_DIR([../build-aux])
LT_CONFIG_LTDL_DIR([.]) # I am me!


## ------------------------ ##
## Automake Initialisation. ##
## ------------------------ ##

AM_INIT_AUTOMAKE([gnu subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])


## ------------------------------- ##
## Libtool specific configuration. ##
## ------------------------------- ##
pkgdatadir='$datadir'"/$PACKAGE"


## ----------------------- ##
## Libtool initialisation. ##
## ----------------------- ##
LT_INIT([dlopen win32-dll])
_LTDL_SETUP


## -------- ##
## Outputs. ##
## -------- ##
AC_CONFIG_FILES([Makefile])
AC_OUTPUT

答案1

您的服务器上是否已php-dev安装?如果没有,请尝试运行sudo apt install php-dev

答案2

apt install php7.4-dev事实证明,查看答案的版本存在错误这里

相关内容