新系统装少了软件包,导致的毛病真多,现在给apache加rewrite模块又出毛病了
Cannot load /usr/local/apache/libexec/mod_rewrite.so into server: /usr/local/apache/libexec/mod_rewrite.so: undefined symbol: dbm_fetch
google之,得到解决办法,
到目录apache_1.3.37/src/modules/standard
gcc -shared -o mod_rewrite.so mod_rewrite.lo
/*没报错*/
gcc -shared -o mod_rewrite.so mod_rewrite.lo -lgdbm
/*这下出错了,下面是错误信息*/
/usr/bin/ld:找不到 -lgdbm
collect2: ld 返回 1
找不到-gdbm这个库,又是因为我装系统时没选上
到我的fedora光盘去搜索*dbm*的rpm包,找到2个
gdbm-1.8.0-26.2.i386.rpm gdbm-devel-1.8.0-26.2.i386.rpm
rpm -ivh gdbm-devel-1.8.0-26.2.i386.rpm
/*rpm成功*/
重新执行
gcc -shared -o mod_rewrite.so mod_rewrite.lo -lgdbm
/*没报错,gcc成功了*/
ok,将新编译好的mod_rewrite.so库文件cp到/usr/local/apache/libexec/
执行apachectl start
返回成功启动,thanks all