Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm trying to install Cisco's vpn client, and it requests that I provide the directory containing linux kernel source code. Specifically, it reads:

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

For RedHat 6.x users these files are installed in /usr/src/linux by default For RedHat 7.x users these files are installed in /usr/src/linux-2.4 by default For Suse 7.3 users these files are installed in /usr/src/linux-2.4.10.SuSE by default

Directory containing linux kernel source code []

where the last line is the prompt and the content in square brackets (in this case nothing) is the default directory.

I'm running crunchbang linux and I cannot find the directory containing the linux kernel source code. Where is the directory containing the linux kernel source code? Or, how can I find it?

Here's is what the manual, entitled VPN Client User Guide for Linux and Solaris has to say about these kernel source requirements:

To install the VPN Client, you must have the kernel source that was used to build the kernel that is running on the system. If the system is using a kernel that came as part of the Linux distribution, or a custom built kernel, the kernel code can be obtained in different ways:

• For users running kernels that came with their distribution—You must install the corresponding kernel-source rpm. The vpn_install script should be able to automatically find the kernel source.

• For users running a custom-built kernel—You must use the same copy of the kernel source that was used to build the kernel you are running. Unpacking the source code for the version of the kernel you are using is insufficient. There are several files generated when the kernel is compiled that the VPN Client uses. These files must exactly match with the kernel you are running. Otherwise, the VPN Client installation might fail.

Since I think I'm in the first case, I ran sudo apt-get install rpm (without knowing anything about rpm), and tried the installation again, hoping that the correct value would now be defaulted, but it wasn't and hence the installation still failed. What is the "kernel-source rpm" and how do I install it?

EDIT As suggested, I tried to install linux-headers-something, but there were many auto-completions of sudo apt-get install linux-headers specifically, they were:

linux-headers-2.6.32-5-486
linux-headers-2.6.32-5-686
linux-headers-2.6.32-5-686-bigmem
linux-headers-2.6.32-5-all
linux-headers-2.6.32-5-all-i386
linux-headers-2.6.32-5-amd64
linux-headers-2.6.32-5-common
linux-headers-2.6.32-5-common-openvz
linux-headers-2.6.32-5-common-vserver
linux-headers-2.6.32-5-common-xen
linux-headers-2.6.32-5-openvz-686
linux-headers-2.6.32-5-vserver-686
linux-headers-2.6.32-5-vserver-686-bigmem
linux-headers-2.6.32-5-xen-686
linux-headers-2.6.36-2.dmz.5-liquorix-686
linux-headers-2.6-486
linux-headers-2.6-686
linux-headers-2.6-686-bigmem
linux-headers-2.6-amd64
linux-headers-2.6-liquorix-686
linux-headers-2.6-openvz-686
linux-headers-2.6-vserver-686
linux-headers-2.6-vserver-686-bigmem
linux-headers-2.6-xen-686

How can I determine which one I should install?

share|improve this question
    
You may need to install the kernel source as a separate package. Try apt-get install linux-headers and apt-get source linux –  Kevin Nov 6 '11 at 21:40
add comment

1 Answer 1

Yeah... CrunchBang Linux uses .debs, not .rpms. Try the linux-headers-2.6-686 package or some variant thereof (e.g. linux-headers-2.6-amd64 on a 64-bit installation). And you don't actually need the source code, you just need the externally-visible headers.

And beware 10-year-old instructions.

share|improve this answer
    
What is a "header"? –  Quinn Culver Nov 6 '11 at 21:47
    
It's programmer-speak for "something C source files use". Frequently ends in ".h". –  Ignacio Vazquez-Abrams Nov 6 '11 at 21:49
    
Does "Try the linux-kernel-devel package..." mean I should be able to apt-get install linux-kernel-devel? If so, it doesn't seem to be working. Of course, it might just be that I need to install a "variant thereof". In that case, any idea what a "variant thereof" might be called? –  Quinn Culver Nov 6 '11 at 21:55
    
@Quinn In this context, the header files are generated when the kernel is compiled. They depend on the kernel version and configuration. You need header files that match your running kernel to compile additional modules. The package name is probably linux-headers-something. Install it with apt-get install or a package manager GUI. –  Gilles Nov 6 '11 at 21:55
    
@Gilles See my edit above regarding your suggestion. –  Quinn Culver Nov 14 '11 at 20:29
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.