当前位置:首页 > 建站心得 > 正文

[转载]Centos6编译安装kingate错误解决

建站心得 · Nov 04, 2012

安装依赖包


yum install make automake gcc gcc-c++ gcc-g77
安装kingate



wget http://downloads.sourceforge.net/project/kingate/kingate/2.1/kingate-2.1.tar.gz

tar xzf kingate-2.1.tar.gz

cd kingate-2.1/

./configure --prefix=/usr/local/kingate

make && make install




Centos6下安装kingate在编译时遇到以下错误:


make[2]: *** [KDnsCache.o] Error 1
make[2]: Leaving directory `/root/workspace/proxy/kingate-2.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/workspace/proxy/kingate-2.1/src'
make: *** [all-recursive] Error 1
make[2]: *** [mysocket.o] Error 1
make[2]: Leaving directory `/root/workspace/proxy/kingate-2.1/src'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/root/workspace/proxy/kingate-2.1/src'
make: *** [all-recursive] Error 1



编辑src/KDnsCache.cpp文件,头部添加:


#include <string.h>



编辑src/mysocket.cpp头部添加


#include <malloc.h>


启动脚本


wget http://soft.vpser.net/proxy/kingate/kingate.init.d

mv kingate.init.d /etc/init.d/kingate

chmod +x /etc/init.d/kingate

chkconfig --level 345 kingate on


发表评论