I am not able to install drivers for my Wi-Fi + Bluetooth card (Broadcom BCM43142).
What I have done till now:
- I have tried using the drivers at this website.
- I tried following the instructions given here for both the
apt-get
install, download tar ball and install and offline install (from Ubuntu's boot DVD). - I tried installing
bcmwl-kernel-source
.
At the end of every single method [1,2,3], when I do a sudo modprobe wl
, I invariably get this:
modprobe: ERROR: could not insert 'wl': Exec format error.
I have also tried blacklisting drivers other than wl
and have tried reinstalling the same several times.
- I also tried using
ndiswrapper
which was successful enough to make the UNCLAIMED driver (see below for the output oflshw -c Network
) change to something else.
However at the end the Wi-Fi did now show up or work.
Kernel version: 3.13.0-24-generic
I have tried everything I could do to my full ability. It would be extremely helpful if you could help me setup my Wi-Fi. I am willing to pastebin output of any commands that you might ask me to execute. (I have added the outputs of lshw -c Network
and lspci -nn
, but please don't hesitate to ask me anything else.)
lshw -c Network
WARNING: you should run this program as super-user.
*-network UNCLAIMED
description: Network controller
product: BCM43142 802.11b/g/n
vendor: Broadcom Corporation
physical id: 0
bus info: pci@0000:02:00.0
version: 01
width: 64 bits
clock: 33MHz
capabilities: bus_master cap_list
configuration: latency=0
resources: memory:90500000-90507fff
lspci
02:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)
The output of sudo apt-get install bcmwl-kernel-source
. The official driver (by Ubuntu) for this WLAN card:
sudo apt-get install bcmwl-kernel-source
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
wireless-bcm43142-oneiric-dkms
The following NEW packages will be installed:
bcmwl-kernel-source
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B/1,126 kB of archives.
After this operation, 1,417 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 318223 files and directories currently installed.)
Removing wireless-bcm43142-oneiric-dkms (6.20.55.19~bdcom0602.0400.1000.0400-0somerville1) ...
Removing all DKMS Modules
Done.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.103ubuntu4) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-24-generic
Selecting previously unselected package bcmwl-kernel-source.
(Reading database ... 318162 files and directories currently installed.)
Preparing to unpack .../bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu2_amd64.deb ...
Unpacking bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ...
Setting up bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ...
Loading new bcmwl-6.30.223.141+bdcom DKMS files...
Building only for 3.13.0-24-generic
Building for architecture x86_64
Building initial module for 3.13.0-24-generic
Done.
wl:
Running module version sanity check.
- Original module
- Installation
- Installing to /lib/modules/3.13.0-24-generic/updates/dkms/
depmod.......
DKMS: install completed.
This is the error I keep getting repeatedly:
modprobe: ERROR: could not insert 'wl': Exec format error
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.103ubuntu4) ...
update-initramfs: Generating /boot/initrd.img-3.13.0-24-generic
Also, what is meant by the same?
I went through the following Ask Ubuntu questions:
The second one seems to be a very comprehensive summary of all possible ways… Still I am stuck up with this Exec Format error
.
Best Answer
OK, so I finally fixed this :D
First here's what I learnt in the process:
NEVER ram your OS with different drivers or modules haphazardly until your problem gets fixed, at least not without a) Knowing what / why you are doing, and b) MOST IMPORTANTLY How to undo the same.
Whenever you try a different driver, module, or package, first uninstall the package that you previously installed for the same purpose.
And lots of thanks to @chili555 who pointed out that the leftover from a previous package was the reason.
So what I did was:
I tried installing
bcmwl-kernel-source
on a live run of Ubuntu 14.04 (with my LAN cable) and checked if WLan works now. (And yeah, it did confirm that Ubuntu 14.04 / BCM43142 /bcmwl-kernel-source
were not the problem.)I went to
/etc/modprobe.d
and cross checked the files there with my hard disk installation's version of the same folder.This
/etc/modprobe.d
directory contains configuration files which contain blacklisting information for different modules. I made a note of the available files and later removed what was not available here from my hard disk installation's version of the same folder too.I went to
/lib/modules/3.*/updates/
. This is the directory that stores all your modules (wl, b43, etc. ... ) and the one that I messed up with various custom patched versions of wl modules listed in various forums.After cross checking with my hard disk installation's version of
lib/modules/3.*/updates/
, I manually removed all Bluetooth / wireless / dkms / wl / (and in particular one mac80211) and cleaned up any other modules that are related to wlan.I finally replaced (did a recursive copy onto) the
/etc/modprobe.d
and/lib/modules/3.*/updates/
directories (of my hard disk installation) with the same directories from the live OS.Reboot
Do
sudo apt-get install bcmwl-kernel-source
. This is the official working driver for BCM43142 for Ubuntu 14.04.Reboot and
sudo modprobe wl
and viola, wireless was working!And finally sincere apologies to all my cross-posting, reposting, spamming IRCs with this question repeatedly. :P
NOTE: Replacing /removing your hard disk installation files is recommended only for those who installed your OS recently. Otherwise there is a risk that you could replace / remove files / modules that may have been installed for other devices which may be irrelevant to this issue.
Thanks again to chili555 :)
EDIT I recently updated my kernel to support the
DisplayLink
driver for my USB monitor and bam the wifi was gone.A blind attempt at re-installing
bcmwl-kernel-source
threw the following error in the build log.Turns out the driver was not updated for the upgraded kernel (version 3.18). A bit of googling let me to this post -
https://bugs.launchpad.net/ubuntu/+source/bcmwl/+bug/1358966
Where there are links available to patched versions of
wl
, which works with the upgraded kernel.I manually downloaded and installed this guy and wifi was restored.
Now I can go back to browsing lolcats in peace. Amen.