<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://kb.linux-vs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zzg</id>
		<title>LVSKB - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://kb.linux-vs.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zzg"/>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki/Special:Contributions/Zzg"/>
		<updated>2026-04-18T14:31:43Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.26.2</generator>

	<entry>
		<id>http://kb.linux-vs.org/wiki?title=Compiling_ipvsadm_on_different_Linux_distributions&amp;diff=11234</id>
		<title>Compiling ipvsadm on different Linux distributions</title>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki?title=Compiling_ipvsadm_on_different_Linux_distributions&amp;diff=11234"/>
				<updated>2012-03-17T09:11:52Z</updated>
		
		<summary type="html">&lt;p&gt;Zzg: /* Cannot find kernel source directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Since [[IPVS]] interface to user-space is different in different Linux kernel versions, there are different versions of [[ipvsadm]] for IPVS inside the different Linux kernel versions.&lt;br /&gt;
&lt;br /&gt;
For IPVS inside the Linux kernel 2.6, you need to use [[ipvsadm]] version 1.24 or later.&lt;br /&gt;
&lt;br /&gt;
For IPVS inside the Linux kernel 2.4, you need to use [[ipvsadm]] 1.21 series.&lt;br /&gt;
&lt;br /&gt;
For IPVS patch for the Linux kernel 2.2, you need to use [[ipvsadm]] version 1.15.&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 3 ==&lt;br /&gt;
&lt;br /&gt;
Red Hat Enterprise Linux 3 (or CentOS 3) kernel has already included the [[IPVS]] patch, so that we do not need to build the kernel image with IPVS support ourselves.&lt;br /&gt;
 [root@penguin root]# modprobe ip_vs&lt;br /&gt;
 [root@penguin root]# cat /proc/net/ip_vs&lt;br /&gt;
 IP Virtual Server version 1.0.8 (size=65536)&lt;br /&gt;
 Prot LocalAddress:Port Scheduler Flags&lt;br /&gt;
   -&amp;gt; RemoteAddress:Port Forward Weight ActiveConn InActConn&lt;br /&gt;
&lt;br /&gt;
For the IPVS version 1.0.8, we should use the ipvsadm version 1.21-10, which support the Linux kernel 1.0.4 or later.&lt;br /&gt;
&lt;br /&gt;
On Red Hat Enterprise Linux 3, make sure that kernel-source rpm is installed at system.&lt;br /&gt;
 [root@penguin src]# rpm -q kernel-source&lt;br /&gt;
 kernel-source-2.4.21-47.0.1.EL&lt;br /&gt;
 [root@penguin src]# pwd&lt;br /&gt;
 /usr/src&lt;br /&gt;
 [root@penguin src]# ln -s linux-2.4.21-47.0.1.EL linux&lt;br /&gt;
&lt;br /&gt;
Then, we can build the ipvsadm-1.21-10 rpm in the following command:&lt;br /&gt;
 rpmbuild --rebuild ipvsadm-1.21-10.src.rpm&lt;br /&gt;
&lt;br /&gt;
Note that ipvsadm-1.21-11.src.rpm is for IPVS 1.0.12 or later, IPVS 1.0.12 is in the Linux kernel 2.4.28 or later 2.4.xx versions.&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 4 ==&lt;br /&gt;
&lt;br /&gt;
On Red Hat Enterprise Linux 4, make sure that kernel-source rpm is installed at system (as showed at http://kbase.redhat.com/faq/FAQ_85_5109.shtm).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# up2date redhat-rpm-config rpm-build kernel-utils&lt;br /&gt;
&lt;br /&gt;
# up2date --get-source kernel&lt;br /&gt;
&lt;br /&gt;
# rpm -ivh /var/spool/up2date/kernel*.src.rpm&lt;br /&gt;
&lt;br /&gt;
# cd /usr/src/redhat/SPECS&lt;br /&gt;
&lt;br /&gt;
# rpmbuild -bp --target=i686 kernel-2.6.spec&lt;br /&gt;
&lt;br /&gt;
# cp -a /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 /usr/src&lt;br /&gt;
&lt;br /&gt;
# ln -s /usr/src/linux-2.6.9 /usr/src/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, we can build the ipvsadm-1.24 rpm in the following command:&lt;br /&gt;
 rpmbuild --rebuild ipvsadm-1.24-6.src.rpm&lt;br /&gt;
&lt;br /&gt;
And install using:&lt;br /&gt;
rpm -ivh /usr/src/redhat/RPMS/i386/ipvsadm-1.24-6.i386.rpm&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 5 ==&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 6 ==&lt;br /&gt;
&lt;br /&gt;
== Compiling Error Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Cannot find kernel source directory ===&lt;br /&gt;
&lt;br /&gt;
Here is the compiling error message&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# make&lt;br /&gt;
make -C libipvs&lt;br /&gt;
make[1]: Entering directory `/var/tmp/ipvsadm-1.24/libipvs'&lt;br /&gt;
gcc -Wall -Wunused -Wstrict-prototypes -g -O2 -I/usr/src/linux/include  -DHAVE_NET_IP_VS_H -c -o libipvs.o libipvs.c&lt;br /&gt;
In file included from libipvs.c:23:&lt;br /&gt;
libipvs.h:14:23: net/ip_vs.h: No such file or directory&lt;br /&gt;
In file included from libipvs.c:23:&lt;br /&gt;
libipvs.h:119: error: syntax error before &amp;quot;fwmark&amp;quot;&lt;br /&gt;
libipvs.h:119: warning: function declaration isn't a prototype&lt;br /&gt;
libipvs.c:27: error: field `svc' has incomplete type&lt;br /&gt;
libipvs.c:28: error: field `dest' has incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_init':&lt;br /&gt;
libipvs.c:40: error: invalid application of `sizeof' to incomplete type `ip_vs_getinfo'&lt;br /&gt;
libipvs.c:44: error: `IP_VS_SO_GET_INFO' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:44: error: (Each undeclared identifier is reported only once&lt;br /&gt;
libipvs.c:44: error: for each function it appears in.)&lt;br /&gt;
libipvs.c: In function `ipvs_getinfo':&lt;br /&gt;
libipvs.c:56: error: invalid application of `sizeof' to incomplete type `ip_vs_getinfo'&lt;br /&gt;
libipvs.c:57: error: `IP_VS_SO_GET_INFO' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_version':&lt;br /&gt;
libipvs.c:64: error: invalid use of undefined type `struct ip_vs_getinfo'&lt;br /&gt;
libipvs.c: In function `ipvs_flush':&lt;br /&gt;
libipvs.c:70: error: `IP_VS_SO_SET_FLUSH' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_add_service':&lt;br /&gt;
libipvs.c:79: error: `IP_VS_SO_SET_ADD' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:79: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_update_service':&lt;br /&gt;
libipvs.c:87: error: `IP_VS_SO_SET_EDIT' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:87: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_del_service':&lt;br /&gt;
libipvs.c:95: error: `IP_VS_SO_SET_DEL' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:95: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_zero_service':&lt;br /&gt;
libipvs.c:103: error: `IP_VS_SO_SET_ZERO' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:103: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_add_dest':&lt;br /&gt;
libipvs.c:109: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:109: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:112: error: `IP_VS_SO_SET_ADDDEST' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_update_dest':&lt;br /&gt;
libipvs.c:119: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:119: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:122: error: `IP_VS_SO_SET_EDITDEST' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_del_dest':&lt;br /&gt;
libipvs.c:129: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:129: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:132: error: `IP_VS_SO_SET_DELDEST' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_set_timeout':&lt;br /&gt;
libipvs.c:140: error: `IP_VS_SO_SET_TIMEOUT' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:141: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_start_daemon':&lt;br /&gt;
libipvs.c:148: error: `IP_VS_SO_SET_STARTDAEMON' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:149: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_stop_daemon':&lt;br /&gt;
libipvs.c:156: error: `IP_VS_SO_SET_STOPDAEMON' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:157: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_get_services':&lt;br /&gt;
libipvs.c:166: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:167: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c:167: error: invalid use of undefined type `struct ip_vs_getinfo'&lt;br /&gt;
libipvs.c:172: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:172: error: invalid use of undefined type `struct ip_vs_getinfo'&lt;br /&gt;
libipvs.c:174: error: `IP_VS_SO_GET_SERVICES' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_cmp_services':&lt;br /&gt;
libipvs.c:189: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:189: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:193: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:193: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:197: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:197: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:201: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:201: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_sort_services':&lt;br /&gt;
libipvs.c:208: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:208: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:209: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c: In function `ipvs_get_dests':&lt;br /&gt;
libipvs.c:218: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:218: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c:218: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:224: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:224: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:225: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:225: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:226: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:226: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:227: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:227: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:228: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:228: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:231: error: `IP_VS_SO_GET_DESTS' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_cmp_dests':&lt;br /&gt;
libipvs.c:243: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:243: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:247: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:247: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_sort_dests':&lt;br /&gt;
libipvs.c:253: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:253: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:254: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c: At top level:&lt;br /&gt;
libipvs.c:259: error: syntax error before &amp;quot;fwmark&amp;quot;&lt;br /&gt;
libipvs.c:260: warning: function declaration isn't a prototype&lt;br /&gt;
libipvs.c: In function `ipvs_get_service':&lt;br /&gt;
libipvs.c:264: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:270: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:270: error: `fwmark' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:271: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:271: error: `protocol' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:272: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:272: error: `addr' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:273: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:273: error: `port' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:274: error: `IP_VS_SO_GET_SERVICE' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_get_timeout':&lt;br /&gt;
libipvs.c:288: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:293: error: `IP_VS_SO_GET_TIMEOUT' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_get_daemon':&lt;br /&gt;
libipvs.c:309: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:315: error: `IP_VS_SO_GET_DAEMON' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: At top level:&lt;br /&gt;
libipvs.c:33: error: storage size of `ipvs_info' isn't known&lt;br /&gt;
make[1]: *** [libipvs.o] Error 1&lt;br /&gt;
make[1]: Leaving directory `/var/tmp/ipvsadm-1.24/libipvs'&lt;br /&gt;
make: *** [libs] Error 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that compiler cannot find the kernel source directory. The fix is to make a symbolic link of kernel source directory to /usr/src/linux.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Problems when make''' :&lt;br /&gt;
make error :   can't find file   'netlink/netlink.h' &lt;br /&gt;
&lt;br /&gt;
'''Solution''':    install the libnl and popt develop packages&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#yum install libnl* popt*&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:IPVS]]&lt;/div&gt;</summary>
		<author><name>Zzg</name></author>	</entry>

	<entry>
		<id>http://kb.linux-vs.org/wiki?title=Compiling_ipvsadm_on_different_Linux_distributions&amp;diff=11233</id>
		<title>Compiling ipvsadm on different Linux distributions</title>
		<link rel="alternate" type="text/html" href="http://kb.linux-vs.org/wiki?title=Compiling_ipvsadm_on_different_Linux_distributions&amp;diff=11233"/>
				<updated>2012-03-17T09:10:53Z</updated>
		
		<summary type="html">&lt;p&gt;Zzg: /* Cannot find kernel source directory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Since [[IPVS]] interface to user-space is different in different Linux kernel versions, there are different versions of [[ipvsadm]] for IPVS inside the different Linux kernel versions.&lt;br /&gt;
&lt;br /&gt;
For IPVS inside the Linux kernel 2.6, you need to use [[ipvsadm]] version 1.24 or later.&lt;br /&gt;
&lt;br /&gt;
For IPVS inside the Linux kernel 2.4, you need to use [[ipvsadm]] 1.21 series.&lt;br /&gt;
&lt;br /&gt;
For IPVS patch for the Linux kernel 2.2, you need to use [[ipvsadm]] version 1.15.&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 3 ==&lt;br /&gt;
&lt;br /&gt;
Red Hat Enterprise Linux 3 (or CentOS 3) kernel has already included the [[IPVS]] patch, so that we do not need to build the kernel image with IPVS support ourselves.&lt;br /&gt;
 [root@penguin root]# modprobe ip_vs&lt;br /&gt;
 [root@penguin root]# cat /proc/net/ip_vs&lt;br /&gt;
 IP Virtual Server version 1.0.8 (size=65536)&lt;br /&gt;
 Prot LocalAddress:Port Scheduler Flags&lt;br /&gt;
   -&amp;gt; RemoteAddress:Port Forward Weight ActiveConn InActConn&lt;br /&gt;
&lt;br /&gt;
For the IPVS version 1.0.8, we should use the ipvsadm version 1.21-10, which support the Linux kernel 1.0.4 or later.&lt;br /&gt;
&lt;br /&gt;
On Red Hat Enterprise Linux 3, make sure that kernel-source rpm is installed at system.&lt;br /&gt;
 [root@penguin src]# rpm -q kernel-source&lt;br /&gt;
 kernel-source-2.4.21-47.0.1.EL&lt;br /&gt;
 [root@penguin src]# pwd&lt;br /&gt;
 /usr/src&lt;br /&gt;
 [root@penguin src]# ln -s linux-2.4.21-47.0.1.EL linux&lt;br /&gt;
&lt;br /&gt;
Then, we can build the ipvsadm-1.21-10 rpm in the following command:&lt;br /&gt;
 rpmbuild --rebuild ipvsadm-1.21-10.src.rpm&lt;br /&gt;
&lt;br /&gt;
Note that ipvsadm-1.21-11.src.rpm is for IPVS 1.0.12 or later, IPVS 1.0.12 is in the Linux kernel 2.4.28 or later 2.4.xx versions.&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 4 ==&lt;br /&gt;
&lt;br /&gt;
On Red Hat Enterprise Linux 4, make sure that kernel-source rpm is installed at system (as showed at http://kbase.redhat.com/faq/FAQ_85_5109.shtm).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# up2date redhat-rpm-config rpm-build kernel-utils&lt;br /&gt;
&lt;br /&gt;
# up2date --get-source kernel&lt;br /&gt;
&lt;br /&gt;
# rpm -ivh /var/spool/up2date/kernel*.src.rpm&lt;br /&gt;
&lt;br /&gt;
# cd /usr/src/redhat/SPECS&lt;br /&gt;
&lt;br /&gt;
# rpmbuild -bp --target=i686 kernel-2.6.spec&lt;br /&gt;
&lt;br /&gt;
# cp -a /usr/src/redhat/BUILD/kernel-2.6.9/linux-2.6.9 /usr/src&lt;br /&gt;
&lt;br /&gt;
# ln -s /usr/src/linux-2.6.9 /usr/src/linux&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then, we can build the ipvsadm-1.24 rpm in the following command:&lt;br /&gt;
 rpmbuild --rebuild ipvsadm-1.24-6.src.rpm&lt;br /&gt;
&lt;br /&gt;
And install using:&lt;br /&gt;
rpm -ivh /usr/src/redhat/RPMS/i386/ipvsadm-1.24-6.i386.rpm&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 5 ==&lt;br /&gt;
&lt;br /&gt;
== Red Hat Enterprise Linux 6 ==&lt;br /&gt;
&lt;br /&gt;
== Compiling Error Analysis ==&lt;br /&gt;
&lt;br /&gt;
=== Cannot find kernel source directory ===&lt;br /&gt;
&lt;br /&gt;
Here is the compiling error message&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# make&lt;br /&gt;
make -C libipvs&lt;br /&gt;
make[1]: Entering directory `/var/tmp/ipvsadm-1.24/libipvs'&lt;br /&gt;
gcc -Wall -Wunused -Wstrict-prototypes -g -O2 -I/usr/src/linux/include  -DHAVE_NET_IP_VS_H -c -o libipvs.o libipvs.c&lt;br /&gt;
In file included from libipvs.c:23:&lt;br /&gt;
libipvs.h:14:23: net/ip_vs.h: No such file or directory&lt;br /&gt;
In file included from libipvs.c:23:&lt;br /&gt;
libipvs.h:119: error: syntax error before &amp;quot;fwmark&amp;quot;&lt;br /&gt;
libipvs.h:119: warning: function declaration isn't a prototype&lt;br /&gt;
libipvs.c:27: error: field `svc' has incomplete type&lt;br /&gt;
libipvs.c:28: error: field `dest' has incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_init':&lt;br /&gt;
libipvs.c:40: error: invalid application of `sizeof' to incomplete type `ip_vs_getinfo'&lt;br /&gt;
libipvs.c:44: error: `IP_VS_SO_GET_INFO' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:44: error: (Each undeclared identifier is reported only once&lt;br /&gt;
libipvs.c:44: error: for each function it appears in.)&lt;br /&gt;
libipvs.c: In function `ipvs_getinfo':&lt;br /&gt;
libipvs.c:56: error: invalid application of `sizeof' to incomplete type `ip_vs_getinfo'&lt;br /&gt;
libipvs.c:57: error: `IP_VS_SO_GET_INFO' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_version':&lt;br /&gt;
libipvs.c:64: error: invalid use of undefined type `struct ip_vs_getinfo'&lt;br /&gt;
libipvs.c: In function `ipvs_flush':&lt;br /&gt;
libipvs.c:70: error: `IP_VS_SO_SET_FLUSH' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_add_service':&lt;br /&gt;
libipvs.c:79: error: `IP_VS_SO_SET_ADD' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:79: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_update_service':&lt;br /&gt;
libipvs.c:87: error: `IP_VS_SO_SET_EDIT' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:87: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_del_service':&lt;br /&gt;
libipvs.c:95: error: `IP_VS_SO_SET_DEL' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:95: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_zero_service':&lt;br /&gt;
libipvs.c:103: error: `IP_VS_SO_SET_ZERO' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:103: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_add_dest':&lt;br /&gt;
libipvs.c:109: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:109: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:112: error: `IP_VS_SO_SET_ADDDEST' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_update_dest':&lt;br /&gt;
libipvs.c:119: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:119: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:122: error: `IP_VS_SO_SET_EDITDEST' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_del_dest':&lt;br /&gt;
libipvs.c:129: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:129: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:132: error: `IP_VS_SO_SET_DELDEST' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_set_timeout':&lt;br /&gt;
libipvs.c:140: error: `IP_VS_SO_SET_TIMEOUT' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:141: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_start_daemon':&lt;br /&gt;
libipvs.c:148: error: `IP_VS_SO_SET_STARTDAEMON' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:149: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_stop_daemon':&lt;br /&gt;
libipvs.c:156: error: `IP_VS_SO_SET_STOPDAEMON' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:157: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_get_services':&lt;br /&gt;
libipvs.c:166: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:167: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c:167: error: invalid use of undefined type `struct ip_vs_getinfo'&lt;br /&gt;
libipvs.c:172: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:172: error: invalid use of undefined type `struct ip_vs_getinfo'&lt;br /&gt;
libipvs.c:174: error: `IP_VS_SO_GET_SERVICES' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_cmp_services':&lt;br /&gt;
libipvs.c:189: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:189: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:193: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:193: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:197: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:197: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:201: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:201: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_sort_services':&lt;br /&gt;
libipvs.c:208: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:208: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:209: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c: In function `ipvs_get_dests':&lt;br /&gt;
libipvs.c:218: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:218: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c:218: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:224: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:224: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:225: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:225: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:226: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:226: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:227: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:227: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:228: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:228: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:231: error: `IP_VS_SO_GET_DESTS' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_cmp_dests':&lt;br /&gt;
libipvs.c:243: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:243: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:247: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:247: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c: In function `ipvs_sort_dests':&lt;br /&gt;
libipvs.c:253: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:253: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:254: error: invalid application of `sizeof' to incomplete type `libipvs.h'&lt;br /&gt;
libipvs.c: At top level:&lt;br /&gt;
libipvs.c:259: error: syntax error before &amp;quot;fwmark&amp;quot;&lt;br /&gt;
libipvs.c:260: warning: function declaration isn't a prototype&lt;br /&gt;
libipvs.c: In function `ipvs_get_service':&lt;br /&gt;
libipvs.c:264: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:270: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:270: error: `fwmark' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:271: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:271: error: `protocol' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:272: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:272: error: `addr' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:273: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:273: error: `port' undeclared (first use in this function)&lt;br /&gt;
libipvs.c:274: error: `IP_VS_SO_GET_SERVICE' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_get_timeout':&lt;br /&gt;
libipvs.c:288: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:293: error: `IP_VS_SO_GET_TIMEOUT' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: In function `ipvs_get_daemon':&lt;br /&gt;
libipvs.c:309: error: dereferencing pointer to incomplete type&lt;br /&gt;
libipvs.c:315: error: `IP_VS_SO_GET_DAEMON' undeclared (first use in this function)&lt;br /&gt;
libipvs.c: At top level:&lt;br /&gt;
libipvs.c:33: error: storage size of `ipvs_info' isn't known&lt;br /&gt;
make[1]: *** [libipvs.o] Error 1&lt;br /&gt;
make[1]: Leaving directory `/var/tmp/ipvsadm-1.24/libipvs'&lt;br /&gt;
make: *** [libs] Error 2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The problem is that compiler cannot find the kernel source directory. The fix is to make a symbolic link of kernel source directory to /usr/src/linux.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Problems when make''' :&lt;br /&gt;
make error :   can't find file   'netlink/netlink.h' &lt;br /&gt;
&lt;br /&gt;
Solution:    install the libnl and popt develop package&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#yum install libnl* popt*&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Category:IPVS]]&lt;/div&gt;</summary>
		<author><name>Zzg</name></author>	</entry>

	</feed>