首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >php 7.4 install Imagick查找未定义的宏失败

php 7.4 install Imagick查找未定义的宏失败
EN

Stack Overflow用户
提问于 2020-10-17 20:43:48
回答 2查看 712关注 0票数 1

我试图在运行php 7.4的Debian 10服务器上安装Imagick,但我收到一个奇怪的宏相关错误,我不明白这是什么意思。

已安装pecl

这是sudo pecl install imagick

代码语言:javascript
运行
复制
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
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
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2020-10-18 17:49:54

我相信有人发布了一个错误版本的php7.4-dev,导致phpize配置失败。

我碰巧用php7.4-dev安装了最新工作版本的docker镜像,并与最新安装的php7.4-dev进行了比较。Found /usr/bin/phpize具有以下差异。

作为一个暂时的解决方案,我认为如果您注释掉/usr/bin/phpize中的(cd "$aclocaldir" && cp $LIBTOOL_FILES "$builddir"/build)行,并将FIELDS_BUILD更改为FILES_BUILD="php.m4 shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 pkg.m4 config.guess config.sub ltmain.sh Makefile.global",它应该可以工作。

代码语言:javascript
运行
复制
root@9dff9e6bd67b:/usr/bin# diff phpize-bad phpize-good
12c12,13
< FILES_BUILD="php.m4 shtool libtool.m4 ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 pkg.m4 config.guess config.sub ltmain.sh Makefile.global"
---
> aclocaldir="$prefix/share/aclocal"
> FILES_BUILD="php.m4 shtool ax_check_compile_flag.m4 ax_gcc_func_attribute.m4 php_cxx_compile_stdcxx.m4 config.guess config.sub ltmain.sh Makefile.global"
13a15
> LIBTOOL_FILES="pkg.m4 libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 lt~obsolete.m4 glib-gettext.m4"
147a150
>   (cd "$aclocaldir" && cp $LIBTOOL_FILES "$builddir"/build)

更新:

我相信最新的包已经解决了这个问题,请apt-get update和apt-get安装php7.4-dev来解决这个问题。

票数 2
EN

Stack Overflow用户

发布于 2020-10-18 01:38:54

突然,今天我在Ubuntu上遇到了同样的问题。这在一段时间以前是有效的。

但是对于imagick,你不再需要使用PECL了,你可能只需要使用:

代码语言:javascript
运行
复制
sudo apt install php-imagick

PHP imagick应该为Debian打包:https://packages.debian.org/buster/php-imagick

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64402604

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档