我必须安装带有 wifi 卡固件的 .deb 文件(这是文件名:wireless-bcm43142-dkms-6.20.55.19_amd64.deb;我从这里下载了该文件:http://www.filewatcher.com/m/wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb.1337086-0.html)。
当我尝试安装 .deb 文件时,我双击该文件,但出现以下错误:
"Failed to install file. Unknown error. Please refer to detailed report and report in your distribution bug tracker.
More details: This package is uninstallable. Dependency is not satisfiable: linux-headers-generic|linux-headers".
我该如何修复它,以便我能够安装 .deb 文件?
apt-get update
我已经通过命令和apt-get upgrade
和更新了系统apt-get dist-upgrade
。
此外,我还尝试使用以下命令安装 linux-headers-generic (不知道这是否可以是解决方案): apt-get install linux-headers-generic 。
但它给出了这个错误:
Package linux-headers-generic is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source.
E: Package "linux-headers-generic" has no installation candidate."
这是以下的输出dpkg -i wireless-bcm43142-dkms-6.20.55.19_amd64.deb
:
Selecting previously unselected package wireless-bcm43142-dkms-6.20.55.19_amd64-deb
(Reading database… 347343 files and directories currently installed.)
Unpacking wireless-bcm43142-oneiric-dkms (from wireless-bcm43142-dkms-6.20.55.19_amd64.deb) …
dpkg: dependency problems prevent configuration of wireless-bcm43142-oneiric-dkms:
wireless-bcm43142-oneiric-dkms depends on linux-headers-generic | linux-headers; however:
Package linux-headers-generic is not installed.
Package linux-headers is not installed.
dpkg: error processing wireless-bcm43142-oneiric-dkms (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
wireless-bcm43142-oneiric-dkms
而 apt-get -f install 的输出:
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following extra packages will be installed:
linux-headers-3.2.0-4-common-rt linux-headers-3.2.0.4-rt-amd64 linux-kbuild-3.2
The following NEW packages will be installed:
linux-headers-3.2.0-4-common-rt linux-headers-3.2.0.4-rt-amd64 linux-kbuild-3.2
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 4,433 kB of archives.
After this operation, 27.9 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Get:1 http://security.debian.org/ wheezy/updates/main linux-headers-3.2.0-4-common-rt amd64 3.2.57-3+deb7u1 [3576 kB]
Get:2 http://debian.net/debian/ wheezy/ main linux-kbuild-3.2 amd64 3.2.17-1 [238 kB]
Get:3 http://security.debian.org/ wheezy/ updates/main linux-headers-3.2.0-4-rt-amd64 amd64 3.2.57-3+deb7u1 [618 kB]
Fetched 4,433 kB in 13s (325 kB/s)
Selecting previously unselected package linux-headers-3.2.0-4-common-rt.
(Reading database… 347406 files and directories currently installed.)
Unpacking linux-headers-3.2.0-4-common-rt (from .../linux-headers-3.2.0-4-common-rt_3.2.57-3+deb7u1_amd64.deb) …
Selecting previously unselected package linux-kbuild-3.2.
Unpacking linux-kbuild-3.2 (from .../linux-kbuild-3.2_3.2.17-1_amd64.deb) …
Selecting previously unselected package linux-headers-3.2.0-4-rt-amd64.
Unpacking linux-headers-3.2.0-4-rt-amd64 (from .../linux-headers-3.2.0-4-rt-amd64_3.2.57-3+deb7u1_amd64.deb) …
Setting up linux-headers-3.2.0-4common-rt (3.2.57-3+deb7u1) …
Setting up linux-kbuild-3.2 (3.2.17-1) …
Setting up linux-headers-3.2.0-4-rt-amd64 (3.2.57-3+deb7u1) …
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 3.2.0-4-rt-amd64
Setting up wireless-bcm43142-oneiric-dkms (6.20.55.19~bdcom0602.0400.1000.0400-0somerville1) …
Loading new wireless-bcm43142-oneiric-dkms-6.20.55.19~bdcom0602.0400.1000.0400 DKMS files …
First Installation: checking all kernels…
Building only for 3.12-kalil-amd64
Building for architecture x86_64
Building initial module for 3.12-kalil-amd64
Error! Bad return status for module build on kernel: 3.12-kalil-amd64 (x86_64)
Consult /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/make.log for more information.
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools…
update-initramfs: Generating /boot/initrd.img-3.12-kalil-amd64
这是 make.log :
DKMS make.log for wireless-bcm43142-oneiric-dkms-6.20.55.19~bdcom0602.0400.1000.0400 for kernel 3.12-kali1-amd64 (x86_64)
Wed May 14 10:44:27 PDT 2014
make: Entering directory `/usr/src/linux-headers-3.12-kali1-amd64'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
LD /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/built-in.o
CC [M] /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/shared/linux_osl.o
CC [M] /var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/wl/sys/wl_linux.o
/var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/wl/sys/wl_linux.c:50:24: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[3]: *** [/var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build/src/wl/sys/wl_linux.o] Error 1
make[2]: *** [_module_/var/lib/dkms/wireless-bcm43142-oneiric-dkms/6.20.55.19~bdcom0602.0400.1000.0400/build] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2
make: Leaving directory `/usr/src/linux-headers-3.12-kali1-amd64'
答案1
您可能想看看这个链接获取分步指南。我在此处复制这些步骤(稍作修改),以防链接过期。
- 打开终端并运行
sudo apt-get update
,然后sudo apt-get install linux-headers-generic build-essential dkms broadcom-sta-modules
- 转到包含包的目录(可能
cd ~/downloads
或类似) - 通过运行以下命令安装软件包:
sudo dpkg -i wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb
- 激活它
sudo modprobe wl
经过这些步骤后应该可以工作。
答案2
kali linux 常见问题解答建议如下:
apt-get install -y linux-headers-$(uname -r)
如果这不起作用,我会检查你的/etc/apt/sources.list
文件。您需要主存储库和更新,并且您可能需要为它们提供 contrib 和 non-free :
deb http://http.kali.org/kali kali main contrib non-free
deb http://security.kali.org/kali-security kali/updates main contrib non-free
答案3
wireless-bcm43142 需要 Broadcom 的 wl 驱动程序。 wireless-bcm43142-dkms-6.20.55.19_amd64.deb 的问题是您需要使用适合您的内核版本的补丁来修补它。
您还需要相应的内核头文件来构建内核驱动程序(wl.ko)您可以使用以下命令识别您的内核版本:uname -r
确保您有适当的内核头文件,否则您无法执行构建
对于内核 4.0,请执行以下步骤:-
将此存储库添加到 /etc/apt/sourrces.list : debhttp://old.kali.org/kalisana 主要非免费贡献
下载 4.0 内核头文件需要 sana
执行 apt-get install linux-headers- uname -r
build-essential -y
从以下位置下载 Broadcom wl 驱动程序源代码 https://github.com/gtank/broadcom-wl-dkms-4.0
将 zip 和 cd 解压到该文件夹
应用全部 9 个补丁
patch -p1 < patches/wl-kmod-001_license.patch
patch -p1 < patches/wl-kmod-002_wext_workaround.patch
patch -p1 < patches/wl-kmod-003_kernel_3.8.patch
patch -p1 < patches/wl-kmod-004_kernel_3.15.patch
patch -p1 < patches/wl-kmod-005_gcc_4.9.patch
patch -p1 < patches/wl-kmod-006_kernel_3.16.patch
patch -p1 < patches/wl-kmod-007_kernel_3.17.patch
patch -p1 < patches/wl-kmod-008_kernel_3.18.patch
patch -p1 < patches/wl-kmod-009_kernel_4.0.patch
然后执行以下代码:
make
cp wl.ko /lib/modules/`uname -r`/kernel/net/wireless/
depmod
rmmod BCMA
echo "blacklist bcma" >> /etc/modprobe.d/blacklist.conf
modprobe wl