cannot install ndiswrapper-dkms

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
w|t

cannot install ndiswrapper-dkms

Post by w|t »

hi guys.

today i upgraded to linux mint 14 with the xfce desktop (from maya) and i cannot install ndiswrapper-dkms to get wireless working. i was told to install source, dkms, common, and util(s) in that order; when i install dkms i get the following message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
ndiswrapper-dkms
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 176 kB of archives.
After this operation, 778 kB of additional disk space will be used.
Get:1 http://cn.archive.ubuntu.com/ubuntu/ quantal/universe ndiswrapper-dkms all 1.57-1ubuntu1 [176 kB]
Fetched 176 kB in 0s (1,008 kB/s)
Selecting previously unselected package ndiswrapper-dkms.
(Reading database ... 138507 files and directories currently installed.)
Unpacking ndiswrapper-dkms (from .../ndiswrapper-dkms_1.57-1ubuntu1_all.deb) ...
Setting up ndiswrapper-dkms (1.57-1ubuntu1) ...
Loading new ndiswrapper-1.57 DKMS files...
First Installation: checking all kernels...
Building only for 3.5.0-17-generic
Building initial module for 3.5.0-17-generic
Error! Bad return status for module build on kernel: 3.5.0-17-generic (i686)
Consult /var/lib/dkms/ndiswrapper/1.57/build/make.log for more information.
catting the log file outputs this:
DKMS make.log for ndiswrapper-1.57 for kernel 3.5.0-17-generic (i686)
Wed Jan 2 20:53:34 CST 2013
make -C /usr/src/linux-headers-3.5.0-17-generic M=/var/lib/dkms/ndiswrapper/1.57/build
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
LD /var/lib/dkms/ndiswrapper/1.57/build/built-in.o
MKEXPORT /var/lib/dkms/ndiswrapper/1.57/build/crt_exports.h
MKEXPORT /var/lib/dkms/ndiswrapper/1.57/build/hal_exports.h
MKEXPORT /var/lib/dkms/ndiswrapper/1.57/build/ndis_exports.h
MKEXPORT /var/lib/dkms/ndiswrapper/1.57/build/ntoskernel_exports.h
MKEXPORT /var/lib/dkms/ndiswrapper/1.57/build/ntoskernel_io_exports.h
MKEXPORT /var/lib/dkms/ndiswrapper/1.57/build/rtl_exports.h
MKEXPORT /var/lib/dkms/ndiswrapper/1.57/build/usb_exports.h
CC [M] /var/lib/dkms/ndiswrapper/1.57/build/crt.o
CC [M] /var/lib/dkms/ndiswrapper/1.57/build/hal.o
CC [M] /var/lib/dkms/ndiswrapper/1.57/build/iw_ndis.o
CC [M] /var/lib/dkms/ndiswrapper/1.57/build/loader.o
CC [M] /var/lib/dkms/ndiswrapper/1.57/build/ndis.o
/var/lib/dkms/ndiswrapper/1.57/build/ndis.c: In function ‘NdisGetCurrentProcessorCounts’:
/var/lib/dkms/ndiswrapper/1.57/build/ndis.c:2657:24: error: ‘struct kernel_stat’ has no member named ‘cpustat’
/var/lib/dkms/ndiswrapper/1.57/build/ndis.c:2658:31: error: ‘struct kernel_stat’ has no member named ‘cpustat’
/var/lib/dkms/ndiswrapper/1.57/build/ndis.c:2659:17: error: ‘struct kernel_stat’ has no member named ‘cpustat’
make[2]: *** [/var/lib/dkms/ndiswrapper/1.57/build/ndis.o] Error 1
make[1]: *** [_module_/var/lib/dkms/ndiswrapper/1.57/build] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
make: *** [modules] Error 2
any ideas on how i can install dkms?

sorry if i omit any crucial information (did i?).

thanks!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
imdpk

Re: cannot install ndiswrapper-dkms

Post by imdpk »

I am running into the same problem any help will be appreciated.
imdpk

Re: cannot install ndiswrapper-dkms

Post by imdpk »

Here is my solution hope this helps everyone with this problem:

1. Download the correct Windows Drivers for your Wireless NIC (32bit/64bit)

2. Extract the windows drivers

3. Using the terminal change directory to the folder you extracted the drivers to, for example:

cd /home/Downloads/ndis6xWin7 (Drivers for ASUS N53jq)

4. Install the Windows drivers using ndiswrapper:

sudo ndiswrapper -i netathrx.inf (your driverName.inf)

5. Download the latest version of ndiswrapper from:

http://sourceforge.net/projects/ndiswrapper/

6. Using the Terminal change the directory to the downloaded file and extract it:

tar -zxvf ndiswrapper-1.58rc1.tar.gz

7. Enter the directory:

cd ndiswrapper-1.58rc1

8. Run:

sudo make uninstall

9. Run:

sudo make

10.Run:

sudo make install

11.Run:

sudo modprobe ndiswrapper

12. Finally update the ndiswrapper config file in /etc/modprobe.d/ndiswrapper.conf by runnning:

sudo ndiswrapper -m

13. sudo reboot now!

Note: Some people may have to do the following before the reboot if the ndiswrapper.conf file has already been created:
Open the file:

gksudo gedit /etc/modprobe.d/ndiswrapper.conf

Delete the content of the file, save and close. Then let the module write the configuration file again:

sudo ndiswrapper -m
Drakonas

Re: cannot install ndiswrapper-dkms

Post by Drakonas »

imdpk wrote:9. Run:

sudo make
Just a recommended correction: "make" should be run, not "sudo make", so the user won't have problems removing the files with their file manager. ndiswrapper will still compile and install just fine.

This is my first time using Linux Mint as my main Linux distro. I've heard good things about LM's Cinnamon desktop. Wish me luck. :wink:

Edit:
w|t wrote:any ideas on how i can install dkms?
imdpk wrote:I am running into the same problem any help will be appreciated.
The previous answer is not a permanent solution.

Follow the guide here for instructions on getting ndiswrapper-1.58 working with dkms. Note: Download the stable 1.58 from here instead. 1.58 has been pushed to stable from testing.

Also, make sure you copy the contents of [ndiswrapper-source-tar-extraction-path]/driver/ to /usr/src/ndiswrapper-1.58, and not everything in the root of the tar.gz file.

You will need to enter su mode to enter most of these commmands (or use sudo {command} every time)

Code: Select all

$ sudo su
Use your password, and don't set the root password. For Ubuntu and Linux Mint, it is recommended not to set the root password, unless you know what you are doing.


I recommend installing ndiswrapper through dkms because then the ndiswrapper module will be reinserted into newer kernels that get installed/updated/compiled. Otherwise, your problems would start all over again after a kernel update.

2nd Edit:
After following the dkms setup, if anyone installs a newer kernel, whether the generic, pae, or lowlatency/realtime kernels, you might experience wireless not working and this error might show upon attempting to load the module:

Code: Select all

$ sudo modprobe ndiswrapper
FATAL: Error inserting ndiswrapper
(/lib/modules/(kernel version)/misc/ndiswrapper.ko): Invalid module format
If you experience this error, simply follow these instructions:

1. Change to the ndiswrapper module source directory for dkms.

Code: Select all

$ cd /usr/src/ndiswrapper-1.58
2. Make a clean build environment, and erase compiled code for previous kernels. This does need root, because root owns this directory.

Code: Select all

$ sudo make clean
3. Uninstall the ndiswrapper module.

Code: Select all

$ sudo dkms uninstall ndiswrapper/1.58
3. Remove the previously failed build of ndiswrapper from your current kernel.

Code: Select all

$ sudo dkms remove ndiswrapper/1.58 -k $(uname -r)
4. Re-build the ndiswrapper module.

Code: Select all

$ sudo dkms build ndiswrapper/1.58
5. Re-install the ndiswrapper module.

Code: Select all

$ sudo dkms install ndiswrapper/1.58
6. Probe the module, and wireless will start again.

Code: Select all

$ sudo modprobe ndiswrapper
Locked

Return to “Networking”