找到phpVersion=$(eval echo '$'{php_${php_version}}),注释掉,改为你想要的版本,比如
phpVersion='8.3.7'
然后找到576行
./configure --prefix=${php_setup_path} --with-config-file-path=${php_setup_path}/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype --with-jpeg --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-pcntl --enable-ftp --enable-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-soap --with-gettext --disable-fileinfo --with-sodium=/usr/local/libsodium --with-webp --build=arm-linux --without-pcre-jit ${i_make_args}
把--build=arm-linux移除,就能编译成功了 |