安装 Mutt 邮件客户端失败经历 | Failure of Installing The Mutt E-Mail Client
1. Mutt Home Page | Mutt 主页
http://www.mutt.org/
2.1 Download Mutt by CVS | 使用 CVS 下载 Mutt
cvs -d :pserver:anonymous@cvs.mutt.org:/home/roessler/cvs login
cvs -z3 -d :pserver:anonymous@cvs.mutt.org:/home/roessler/cvs co mutt
2.2 Download Mutt by FTP | 下载 Mutt tarball
wget ftp://ftp.mutt.org/mutt/mutt-1.4.2.1i.tar.gz
3. Install Mutt and Troubleshooting | 安装 Mutt
CVS 的安装:
和 tarball 不同的是,使用 prepare 命令而非 configure 命令来作 mutt 的安装准备工作。有一些 warnings :
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'于是查看 Changelog中的描述。
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':WARNING: AC_DEFINE([NEED_MAIN], 1,
WARNING: [Define if a function `main' is needed.])WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
rm -f Makefile.am Makefile.amt
...
...
checking whether this iconv is good enough... no
configure: error: Try using libiconv instead
- Mutt now uses the iconv interface for character set conversions.
This means that you need either a very modern libc, or Bruno
Haible's libiconv, which is available from
<http://www.gnu.org/software/libiconv/>.
首先对系统中现有的 iconv 进行检测。
# whereis iconv
iconv: /usr/bin/iconv /usr/local/bin/iconv /usr/include/iconv.h
/usr/share/man/man1/iconv.1.gz /usr/share/man/man3/iconv.3.gz
# iconv -V
iconv (GNU libc) 2.3.2
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Ulrich Drepper.
Mutt 的 INSTALL 中关于 iconv 的描述
Character set support
=====================Mutt no longer contains functions for doing character set conversion.
Instead, it expects the iconv functions (iconv_open, iconv,
iconv_close) to be provided. Most up-to-date systems provide these
functions, often as part of the C library. If you are installing Mutt
on a system which does not have them, it is recommended that you
install Bruno Haible's portable libiconv library, which you can obtain
from:ftp://ftp.ilog.fr/pub/Users/haible/gnu/
Even if your system does provide the iconv functions, you might want
to install libiconv, as some systems provide only a very limited
version of iconv.
If you decide to use your system's iconv implementation, you may
need to tell mutt about implementation-defined names for some
character sets. Sample configuration files for various systems can
be found in the directory contrib/iconv/ in this source
distribution, and will be installed in the samples/iconv directory
as part of mutt's documentation.In order to use these sample configuration files, just put a line
likesource /usr/local/doc/mutt/samples/iconv/iconv.osf1-4.0d.rc
into your system's global Muttrc, which normally resides in /etc or
/usr/local/etc.
If you really want to, you can configure Mutt --disable-iconv, but
there will then be no character set conversion.
安装 libiconv
主页: http://www.gnu.org/software/libiconv/
下载包: http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.9.1.tar.gz
配置和安装 libiconv
$ ./configure --prefix=/usr/local
$ make
$ make install
好了,回到 mutt 的安装上来。 我们不想使用系统自带的 iconv ,所以查询了 ./configure --help 后,使用以下命令进行配置。
# ./configure --with-libiconv-prefix=/usr/local/lib/
但是问题仍旧存在,对于系统的 iconv 和 现装的 libiconv 实在有点困惑。等待以后再次解决。非常欢迎大家的指正。
-----------------
问题解决:
经过两天连续十几个小时的测试,最终在 mutt google group 上找到了答案。原来是 1.9.1 版本的 libiconv 并不能正常编译。查看 config.log 会找到如下错误:
undefined reference to `libiconv_open'因此下载了最新的版本 1.9.2 ,即可编译成功。具体请看 google group 上的讨论。
undefined reference to `libiconv_close'
周转了这么多天,还是自己不仔细,没有在一开始下载 libiconv 的时候看清有最新的 1.9.2 版本,也许对于 gnu 的 source 来说,版本的相差会在实行上有很大的差距,所以这点是要非常重视的。
参考资料: