gpt4 book ai didi

php - 在 azure webapp linux 容器中安装 apcu PHP 扩展

转载 作者:行者123 更新时间:2023-12-04 17:23:42 24 4
gpt4 key购买 nike

我正在尝试在 Azure 应用服务中启动现有的 PHP 应用程序。应用程序正在使用 apcu 扩展名。我正在尝试安装应用程序服务的扩展。我通过 ssh 连接并尝试通过

安装扩展
pecl install apcu

但我收到以下错误:

creating libtool
appending configuration tag "CXX" to libtool
configure: patching config.h.in
configure: creating ./config.status
config.status: creating config.h
running: make
/bin/bash /tmp/pear/temp/pear-build-rootdX8M2c/apcu-5.1.19/libtool --mode=compile cc -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/apcu -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootdX8M2c/a
pcu-5.1.19/include -I/tmp/pear/temp/pear-build-rootdX8M2c/apcu-5.1.19/main -I/tmp/pear/temp/apcu -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/u
sr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /tmp/pear/temp/apcu/apc.c -o apc.lo
cc -D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 -I. -I/tmp/pear/temp/apcu -DPHP_ATOM_INC -I/tmp/pear/temp/pear-build-rootdX8M2c/apcu-5.1.19/include -I/tmp/pear/temp/pear-build-rootdX8M2c/apcu-5.1.19/main -I/tmp
/pear/temp/apcu -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g
-O2 -c /tmp/pear/temp/apcu/apc.c -fPIC -DPIC -o .libs/apc.o
In file included from /tmp/pear/temp/apcu/apc.c:32:
/tmp/pear/temp/apcu/apc.h:64:10: fatal error: config.h: No such file or directory
#include <config.h>
^~~~~~~~~~
compilation terminated.
make: *** [Makefile:194: apc.lo] Error 1
ERROR: `make' failed

最佳答案

我认为这是 php 7.4 版本中的错误。我将它切换到 7.27.3,它对我有用。

提示

如果你坚持使用7.4版本,可以尝试安装apcu,然后将版本切换回7.4。我没有用项目测试过这个解决方案,它只是一个替代方案,我希望它对你有帮助。

You can raise a support ticket to confirm this .

先把php版本改成7.2或者7.3

并运行命令 pecl install apcu它对我有用。

第 1 步。更改 php 版本。

enter image description here

第 2 步。打开 SSH。

enter image description here

第 3 步。运行命令 pecl install apcu

enter image description here enter image description here

关于php - 在 azure webapp linux 容器中安装 apcu PHP 扩展,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64714818/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com