I was trying to install Cisco VPN in my Ubuntu 8.04 desktop yesterday. I was following my own guide and I got an error when I tried to install the VPN. Here is the command I issued and the error I got. (Everything that follows now were done in a terminal, which you can access from Application – Accessories – Terminal).

Quaddesktop:~/vpnclient$ sudo ./vpn_install

Cisco Systems VPN Client Version 4.8.01 (0640) Linux Installer
Copyright (C) 1998-2006 Cisco Systems, Inc. All Rights Reserved.

By installing this product you agree that you have read the
license.txt file (The VPN Client license) and will comply with its terms.

Directory where binaries will be installed [/usr/local/bin]

Automatically start the VPN service at boot time [yes]

In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.

Directory containing linux kernel source code [/lib/modules/2.6.24-16-generic/build]

* Binaries will be installed in “/usr/local/bin”.
* Modules will be installed in “/lib/modules/2.6.24-16-generic/CiscoVPN”.
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from “/lib/modules/2.6.24-16-generic/build” will be used to build the module.

Is the above correct [y]

Making module
make -C /lib/modules/2.6.24-16-generic/build
SUBDIRS=/home/prabha/vpnclient modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-16-generic’
CC [M] /home/prabha/vpnclient/linuxcniapi.o
In file included from /home/prabha/vpnclient/Cniapi.h:15,
from /home/prabha/vpnclient/linuxcniapi.c:31:
/home/prabha/vpnclient/GenDefs.h:113: error: conflicting types for ‘uintptr_t’
include/linux/types.h:40: error: previous declaration of ‘uintptr_t’ was here
make[2]: *** [/home/prabha/vpnclient/linuxcniapi.o] Error 1
make[1]: *** [_module_/home/prabha/vpnclient] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic’
make: *** [default] Error 2
Failed to make module “cisco_ipsec.ko”.

Update July 21st 2008: Read Oleg comments (#42) below. Try that before proceeding to the steps below.

Note: For some users it worked only when they followed the steps listed by skramstad in the comments below (Comment #23) before they followed the steps below.

I googled and found out from Lamnk that I need to install a patch if I’m using Kernel version 2.6.24-xx. As you can see above, my Ubuntu installation was using 2.6.24-16-generic kernel. I then downloaded the patch by issuing

wget
http://projects.tuxx-home.at/ciscovpn/patches/vpnclient-linux-2.6.24-final.diff

I downloaded the patch into my vpnclient directory. I then tried to install the patch.

Quaddesktop:~/vpnclient$ patch < ./vpnclient-linux-2.6.24-final.diff

The program ‘patch’ is currently not installed. You can install it by typing:
sudo apt-get install patch
bash: patch: command not found

Obviously, I was missing the patch program. I then installed the patch program.

Quaddesktop:~/vpnclient$ sudo apt-get install patch
Reading package lists… Done
Building dependency tree
Reading state information… Done
Suggested packages:
diff-doc
The following NEW packages will be installed: patch
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 95.6kB of archives.
After this operation, 193kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com hardy/main patch 2.5.9-4 [95.6kB]
Fetched 95.6kB in 12s (7422B/s)
Selecting previously deselected package patch.
(Reading database … 111891 files and directories currently installed.)
Unpacking patch (from …/patch_2.5.9-4_i386.deb) …
Setting up patch (2.5.9-4) …

Once the patch program was installed, I installed the VPN patch.

Quaddesktop:~/vpnclient$ patch < ./vpnclient-linux-2.6.24-final.diff
patching file GenDefs.h
patching file interceptor.c

The patch was done and I installed the VPN without any issue after that.

Quaddesktop:~/vpnclient$ sudo ./vpn_install

It worked flawlessly after that. For steps to follow after the installation, check my post about VPN installation.

Update: Whenever there is an update to the kernel, I had to reinstall VPN. I didn’t have to do the patching part, but I still have to go to vpnclient directory under my home directory and issue the command sudo ./vpn_install. I’m not sure if others have this problem.