Ubuntu下 FileZilla安装历险记

来源:岁月联盟 编辑:exp 时间:2012-02-16
以前在学校的时候经常使用FileZilla 下载资源,觉得挺好的;但是工作以后再也没有用过;最近需要做了一些网页想上传到网站中,于是下载了FileZilla_3.5.3_src.tar.bz2 源码,然后进行编译:提示没有wxWidgets 所以又接着下载wxWidgets , 于是从http://www.wxwidgets.org/ 下载了最新版wxWidgets-2.9.3.tar.bz2 ,解压安装, 安装完成之后;再来编译FileZilla.
不料又提示:configure: error: idna.h not found which is part of GNU libidn.
晕菜了............
只能打开configure 看看这个Shell脚本:其中有这么一段:
?
# Libidn checks
# -------------
ac_fn_c_check_header_mongrel "$LINENO" "idna.h" "ac_cv_header_idna_h" "$ac_includes_default"
if test "x$ac_cv_header_idna_h" = xyes; then :
else
as_fn_error $? "idna.h not found which is part of GNU libidn." "$LINENO" 5
fi
checking for wxWidgets version >= 2.8.12 (--unicode=yes --universal=no)... yes (version 2.9.3)
checking for wxWidgets static library... no
configure: error: You need to use wxWidgets 2.8.x to compile this program.
复制代码
?
<BR>
这提示Libidn 库没有安装,那么安装吧:
sudo apt-get install  libidn*
想想这下应该OK了吧》
始料未及的是 提示
checking for wxWidgets version >= 2.8.12 (--unicode=yes --universal=no)... yes (version 2.9.3)
checking for wxWidgets static library... no
configure: error: You need to use wxWidgets 2.8.x to compile this program.
复制代码
我晕,我的版本可是2.9.3耶, 远高于2.8.x ; 那只能修改Shell脚本了 :configure
  if test "$wx_config_major_version" -gt "2" || test "$wx_config_minor_version" -gt "8"; then
    as_fn_error $? "You need to use wxWidgets 2.8.x to compile this program." "$LINENO" 5
  fi
复制代码
原来版本还不能高于2.8 将8 改成9; 然后将以下2.8 全部改成2.9.*就OK了。
if test -n "$LIBGNUTLS_CFLAGS"; then
    pkg_cv_LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && /
    { { $as_echo "$as_me:${as_lineno-$LINENO}: /$PKG_CONFIG --exists --print-errors /"gnutls >= 2.8.3/""; } >&5
  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.3") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: /$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls >= 2.8.3" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBGNUTLS_LIBS"; then
    pkg_cv_LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && /
    { { $as_echo "$as_me:${as_lineno-$LINENO}: /$PKG_CONFIG --exists --print-errors /"gnutls >= 2.8.3/""; } >&5
  ($PKG_CONFIG --exists --print-errors "gnutls >= 2.8.3") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: /$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls >= 2.8.3" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
复制代码
 
总结: 在安装一个软件之前一定要看相关文档:INSTALL,README 等;里面会提供软件依赖情况,如FileZilla 的INSTALL 的Requirements:
  8 FileZilla depends on the following libraries:
  9 - wxWidgets 2.8.12 or greater
 10 - libidn
 11 - GnuTLS 2.8.3 or greater
 12 - libdbus on *nix
 13 - sqlite3 3.7 or greater
复制代码
在编译或使用的过程中得查看configure 文件。如果还是搞不定,那就GOOGLE吧。
 

作者 怕虫的瞌睡虫