安装courier-authlib时make错误

./configure --prefix=/usr/local/courier-authlib --without-stdheaderdir --without-authuserdb --without-authpam --without-authldap --without-authpwd --without-authshadow --without-authvchkpw --without-authpgsql --with-authdaemonvar=/var/spool/authdaemon --without-authcustom --with-authmysql --with-mysql-libs=/usr/local/mysql/lib/mysql --with-mysql-includes=/usr/local/mysql/include/mysql --with-authmysqlrc=/usr/local/courier-authlib/etc/authmysqlrc --with-mailuser=vmail --with-mailgroup=vmail --with-authdaemonrc=/usr/local/courier-authlib/etc/authdaemonrc CHOST="i686-pc-linux-gnu" CFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="-march=pentium4 -O2 -pipe -fomit-frame-pointer"
(以上是同一条命令)

root@net-server:/usr/src/courier-authlib-0.60.2# make
root@net-server:/usr/src/courier-authlib-0.60.2# make install


#### 特别提示2.如果courier-authlib安装到非标准位置(例如安装到/usr/local下,我的安装路径是 /usr/local/authlib),一定记得在./configure时增加--without-stdheaderdir,这样以后在编译Courier-IMAP和maildrop的时候,不用特别指定courier-authlib的库文件位置
#### 特别提示3,检查相关软件或库文件路径,这里可能与你实际情况不同:比如 mysql-include,我的是/usr/local/mysql/include/ ,mysql-libs路径是/usr/local/mysql/lib。

#### 特别提示4,编译出现过程出现如下错误(其实我的mysql 4.1.22之前一直正常使用的):,这是因为在编译指错了--with-mysql-includes的路径。
authmysql.h:8:26: mysql.h: No such file or directory
authmysql.h:9:27: errmsg.h: No such file or directory
make[2]: *** [authmysql.lo] Error 1
make[2]: Leaving directory `/usr/src/courier-authlib-0.60.2'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/courier-authlib-0.60.2'
make: *** [all] Error 2

后来用locate mysql.h找到此文件在/usr/local/mysql/include/mysq/中。我也很郁闷,其它软件在编译,像这样的路径完全是可能写成/usr/local/mysql/include.不知道为什么,编译courier-authlib却不行。看来不能偷懒哦,改为--with-mysql-includes=/usr/local/mysql/include/mysql --with-mysql-libs=/usr/local/mysql/lib/mysql 就可以了.

你可能感兴趣的:(职场,休闲,苦啊)