LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problem installing ndiswrapper as the kernel version cannot be located. (http://www.linuxquestions.org/questions/linux-newbie-8/problem-installing-ndiswrapper-as-the-kernel-version-cannot-be-located-817996/)

doublemac 07-04-2010 04:07 PM

Problem installing ndiswrapper as the kernel version cannot be located.
 
I am trying to install ndiswrapper, and have gotten as far as extracting the .gz file. However, when I type in the "make" command, it returns the error message:

Cannot find kernel version in /usr/src/linux-2.6.21.5, is it configured? Stop.

I do not have anything in the folder /usr/src, so I don't know where it might be. I'd like to install this, so it will make my switch to Linux easier. Help is much appreciated,

kilgoretrout 07-04-2010 04:50 PM

You need to install your kernel source code to compile kernel modules like ndiswrapper. That's what it is complaining about - you haven't installed your kernel source code. Post what distro you are using. Most distros have a kernel source package available that you can install but it's generally not installed by default. Also post the output of:

$ uname -a

That will list the kernel you are running which will help in identifying the correct kernel source package.

doublemac 07-05-2010 01:52 PM

Thanks a lot for responding. I am not sure what the "distro" is, but if you could tell me how to find it I will let you know. However, the output for $ uname -a is:

Linux bt 2.6.21.5 #4 SMP Thu Apr 10 04:23:56 GMT 2008 i686 Intel(R) Core(TM)2 Quad CPU Q8200 @ 2.33 GHz GenuineIntel GNU/Linux

Again, I'm very grateful to you for getting back to me, and I hope you can help me resolve this. Thank you.

doublemac 07-05-2010 04:21 PM

OK some additional information:
- I am running Backtrack 3 on VMWare, and it says I have an "other Linux 2.6.x kernel"

I hope that helps.

kilgoretrout 07-06-2010 03:01 PM

Backtrack 3 is a specialized linux distribution for network penetration testing. As such, they don't appear to have a well organized ecosystem of software packages available in internet repositories or "repos". I did find this link discussing the installation of kernel source in Backtrack:

http://forums.remote-exploit.org/bac...l-sources.html

which advises to run these commands as root:

# wget http://www.offensive-security.com/kernel.lzm
# lzm2dir kernel.lzm /

You need to have internet connectivity to run the wget command which downloads the kernel source package, kernel.lzm. I have no way of knowing whether that package matches your kernel, however. You may want to try your luck at the Backtrack forum here:

http://www.backtrack-linux.org/forums/

doublemac 07-07-2010 04:46 PM

I think I love you bro.

It all worked out and you are my hero.

ejang 01-12-2011 08:05 PM

same problem with BT4
 
hey all, i see that the solution worked for BT3. I have BT4, below are my stats:
macbook pro 5,3
uname-a output: Linux bt 2.6.35.8 #1 SMP Sun Nov 14 06:32:36 EST 2010 i686 GNU/Linux
lspci output: 04:00.0 Network controller: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller (rev 01)

I'm trying to follow the tutorial here to get my broadcom wireless driver working, but I am having trouble installing ndiswrapper (ran into the fatal: module not found problem and was not able to find the file required for those solutions... etc.)

so I decided to backtrack (pardon the stupid pun) a bit and install ndiswrapper "the backtrack way"

i followed this tutorial: http://www.backtrack-linux.org/forum...iswrapper.html

except when I try to run the makefile, this is what comes up (error message bolded):
Code:

root@bt:~/ndiswrapper-1.56# make
make -C driver
make[1]: Entering directory `/root/ndiswrapper-1.56/driver'
Makefile:34: *** Cannot find kernel version in /usr/src/linux, is it configured?.  Stop.
make[1]: Leaving directory `/root/ndiswrapper-1.56/driver'
make: *** [all] Error 2

unfortunately I think the lzm2dir command is no longer compatible, and i hesitate to do anything BT3-related with my BT4 distro.

Sorry for being a newbie, if there are any non-newbies out there I would really appreciate it.

Thanks!


All times are GMT -5. The time now is 05:30 PM.