安装filezilla client报错,已经安装了wxWidgets,确报错没有安装wxWidgets


【现象】通过编译代码来安装filezilla,首先执行./configure,报如下错误:

configure: error:
        wxWidgets must be installed on your system
        but either the wx-config script couldn't be found or
        no compatible wxWidgets configuration has been installed.

        Compatible wxWidgets configurations are the unicode builds
        of wxGTK, wxMac and wxMSW.

        Please check that wx-config is in path, the directory
        where wxWidgets libraries are installed (returned by
        'wx-config --libs' command) is in LD_LIBRARY_PATH or
        equivalent variable and wxWidgets version is 2.8.12.0 or above.

【排查】

已经安装了gtk版的wxWidgets,且存在/usr/local/bin/wx-config。

1、/usr/local/bin/wx-config --version-full查看版本号为:
2.8.12.0

 /usr/local/bin/wx-config --libs结果如下:
-L/usr/local/lib -pthread   -lwx_gtk2_richtext-2.8 -lwx_gtk2_aui-2.8 -lwx_gtk2_xrc-2.8 -lwx_gtk2_qa-2.8 -lwx_gtk2_html-2.8 -lwx_gtk2_adv-2.8 -lwx_gtk2_core-2.8 -lwx_base_xml-2.8 -lwx_base_net-2.8 -lwx_base-2.8

得知wxWidgets的库在/usr/local/lib路径。

查看LD_LIBRARY_PATH环境变量为空。

 export|grep LD_LIBRARY_PATH

2、设置环境变量LD_LIBRARY_PATH=/usr/local/lib

导出环境变量export LD_LIBRARY_PATH

查看环境变量export|grep LD_LIBRARY_PATH

declare -x LD_LIBRARY_PATH="/usr/local/lib"

重新../configure,还是报同样的错误。

3、查看configure文件,发现15450行出现,

  if test "$wxWin" != 1; then
    as_fn_error $? "
        wxWidgets must be installed on your system
        but either the wx-config script couldn't be found or
        no compatible wxWidgets configuration has been installed.

        Compatible wxWidgets configurations are the unicode builds
        of wxGTK, wxMac and wxMSW.

        Please check that wx-config is in path, the directory
        where wxWidgets libraries are installed (returned by
        'wx-config --libs' command) is in LD_LIBRARY_PATH or
        equivalent variable and wxWidgets version is $MIN_WX_VERSION or above.
    " "$LINENO" 5
  fi

4、经过跟踪,发现15304行执行报错。

    WX_VERSION=`$WX_CONFIG_WITH_ARGS --version 2>/dev/null`

进行变量展开,得到如下形式:

WX_VERSION=`/usr/local/bin/wx-config --unicode=yes --universal=no aui,xrc,adv,core,xml,net,base --version 2>/dev/null`

执行/usr/local/bin/wx-config --unicode=yes --universal=no aui,xrc,adv,core,xml,net,base --version 2>/dev/null,得到空值。

执行/usr/local/bin/wx-config --unicode=yes --universal=no aui,xrc,adv,core,xml,net,base --version,报错

# /usr/local/bin/wx-config --unicode=yes --universal=no aui,xrc,adv,core,xml,net,base --version

  Warning: No config found to match: /usr/local/bin/wx-config --unicode=yes --universal=no aui,xrc,adv,core,xml,net,base --version
           in /usr/local/lib/wx/config
  If you require this configuration, please install the desired
  library build.  If this is part of an automated configuration
  test and no other errors occur, you may safely ignore it.
  You may use wx-config --list to see all configs available in
  the default prefix.


发现aui,xrc,adv,core,xml,net,base是wx安装的库文件,对应的是在/usr/local/lib目录下面的so文件。

运行/usr/local/bin/wx-config --list得到

Default config is gtk2-ansi-release-2.8

  Default config will be used for output

运行/usr/local/bin/wx-config --version示2.8.12。

【解决方案】

修改configure脚本,

将WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args --unicode=yes --universal=no aui,xrc,adv,core,xml,net,base"改成

WX_CONFIG_WITH_ARGS="$WX_CONFIG_PATH $wx_config_args"

重新执行./configure脚本。该问题就解决了。
















评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值