Hi,

Im trying to install the driver for my wireless, have updated the firmware and now need to install the driver. However I get make error:

makefile not found at '/lib/modules/2.6.22-3-686/source'

does this mean i need to install my kernel source?? i have my kernel headers installed but can't work out how to do the kernel source.

Oh the kernel im running is:

debian lenny 2.6.22-3-686

thanks in advance for any help!!

Dani AI

Generated

The error you saw ("Makefile not found at /lib/modules/.../source") means the kernel build tree the driver expects wasn't available. fixed it by installing the kernel source and pointing the module build path at that tree — that is a valid quick fix because out‑of‑tree drivers need the top‑level kernel Makefile and kbuild infrastructure to compile.

A cleaner approach on Debian is to install the matching kernel headers plus the usual build tools instead of unpacking full source. The headers package supplies the prepared tree needed for external modules and is smaller and easier to keep in sync with package updates. Also make sure the build toolchain is present.

uname -r
sudo apt-get install build-essential linux-headers-$(uname -r)

For long‑term stability, use DKMS or module‑assistant so your driver is automatically rebuilt whenever the kernel is upgraded. If a package provides a DKMS config, installing it avoids manual rebuilds after kernel updates.

sudo apt-get install dkms module-assistant
sudo m-a prepare

Troubleshooting tips: verify that /lib/modules/$(uname -r)/build (or /source) actually points to the headers/source tree the module build expects; if it does not, the build system will fail. Ensure the header package exactly matches the running kernel (Debian adds distribution suffixes like “-3-686” that must match). If a driver still fails, look at the first compile error (missing symbols, config options) rather than the final make failure—those messages tell you whether the tree is unprepared, a symbol export is missing, or the compiler toolchain is wrong.

solved used
apt-get install linux-source-2.6.22
then cd /usr/src
untar the linux source
then
ln -s /usr/src/linux-source-2.6.22 /lib/modules/2.6.22-3-686/source
worked!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.