【发布时间】:2020-04-07 20:04:49
【问题描述】:
我正在 AIX 7.2 机器上从源代码安装 PHP 7.2 以及 Apache 2.4。按顺序使用以下命令。第 1 步和第 2 步没有错误。
1)./configure --prefix=/opt/php/install --with-config-file-path=/opt/php/install --with-apxs2=/opt/apache/install/bin/apxs --with-openssl=/opt/freeware/openssl --with-curl=/opt/curl/install --with-png-dir=/opt/freeware --with-zlib-dir=/opt/freeware --with-iconv=/opt/freeware --enable-mbstring --with-gd --with-gmp=/opt/gmp/install --enable-cli --disable-phar
2)make
3)make install.
出现以下错误。如何解决?
echo '\
\
echo '\
\
Installing PHP SAPI module: apache2handler
Use of uninitialized value in concatenation (.) or string at /opt/apache/install/bin/apxs line 222.
/opt/apache/install/build/instdso.sh SH_LIBTOOL='/opt/apache/install/build/libtool' libphp7.la /opt/apache/install/modules
rm -f /opt/apache/install/modules/libphp7.so
/opt/apache/install/build/libtool --mode=install install libphp7.la /opt/apache/install/modules/
libtool: install: install .libs/libphp7.a /opt/apache/install/modules/libphp7.a
find: bad status-- /opt/apache/install/modules/libphp7.a
install: File libphp7.a was not found.
apxs:Error: Command failed with rc=131072
.
make: The error code from the last command is 1.
Stop
我认为它无法将 libphp7.a 文件从 PHP 的 ./libs 文件夹复制到 apache/install/modules。
【问题讨论】:
-
你可以尝试一件事:用
LDFLAGS=-Wl,-brtl重复每次编译 -
@LorinczyZsigmond 我只为 PHP 运行了“make LDFLAGS=-Wl, -brtl”。它因同样的错误而失败。我需要为 Apache、curl 等运行相同的命令吗? "LDFLAGS=-Wl, -brtl" 的含义是什么?
-
您可能会尝试,但您应该意识到在 AIX 上编译是困难的,您将面临无数问题。 (我写过一些关于 AIX 的文字,可能会很有趣:lzsiga.users.sourceforge.net/aix-linking.html)
标签: apache aix php-7.2 make-install