You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Ubuntu 18.04上安装WSO2 WSF/PHP扩展时make命令报错求助

问题描述

我在搭载PHP5.6的Ubuntu 18.04服务器上安装WSO2 PHP扩展时,执行make命令出现以下错误:

make[4]: Leaving directory '/home/mat/wso2-wsf-php-src-2.1.0/wsf_c/rampartc'
Making all in savanc
/bin/bash: line 17: cd: savanc: No such file or directory
Makefile:325: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/home/mat/wso2-wsf-php-src-2.1.0/wsf_c'
Makefile:221: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/mat/wso2-wsf-php-src-2.1.0/wsf_c'
Makefile:276: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/mat/wso2-wsf-php-src-2.1.0'
Makefile:206: recipe for target 'all' failed
make: *** [all] Error 2

解决方法

这个错误是因为编译时找不到savanc目录,通常由源码不完整或依赖缺失导致,按以下步骤修复:

  • 检查源码完整性
    若通过Git克隆源码,执行命令拉取所有子模块:

    git submodule update --init --recursive
    

    若直接下载压缩包,重新下载完整包,避免文件损坏或缺失。

  • 安装编译依赖
    在Ubuntu 18.04上安装必要的编译依赖库:

    sudo apt-get update
    sudo apt-get install build-essential php5.6-dev libxml2-dev libssl-dev libcurl4-openssl-dev libneon27-dev
    
  • 重置编译环境
    清理之前的编译残留,重新配置编译参数:

    cd /home/mat/wso2-wsf-php-src-2.1.0
    make clean
    ./configure --with-php-config=/usr/bin/php-config5.6
    

    注意替换/usr/bin/php-config5.6为你服务器上实际的PHP5.6配置文件路径。

  • 重新编译安装
    配置完成后重新执行编译:

    make
    

    编译成功后执行安装:

    sudo make install
    

内容的提问来源于stack exchange,提问作者Mat

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.20 01:10:35