OpenWRT opkg 安装软件包时内核版本不匹配问题解决

问题描述

今天在软路由上安装无线网卡,网卡型号为AR5B125,网上找资料得到驱动包在kmod-ath9k中,一顿操作安装,报错kmod-ath9k found, but incompatible with the architectures configured。

固件版本 Openwrt Koolshare Router V2.37 r17471-8ed31dafdf
内核版本 5.4.108

软件包地址:https://downloads.openwrt.org/snapshots/targets/x86/64/packages/
需要内核版本:5.4.137

解决方案

匹配内核

如图在package目录中找到以kernel开头的ipk文件(类似内核补丁),下载并安装,然后重启;以5.4.137为例

kernel补丁示意图

1
2
3
4
cd /tmp
wget https://downloads.openwrt.org/snapshots/targets/x86/64/packages/kernel_5.4.137-1-4f48e32cee7fd90c0bd24dca8312f71a_x86_64.ipk
opkg install kernel_5.4.137-1-4f48e32cee7fd90c0bd24dca8312f71a_x86_64.ipk
reboot

安装需要的包

现在就可以正常安装原来无法安装的包了

1
2
3
cd /tmp
wget https://downloads.openwrt.org/snapshots/targets/x86/64/packages/kmod-ath9k_5.4.137+5.10.42-1-1_x86_64.ipk
opkg install kmod-ath9k_5.4.137+5.10.42-1-1_x86_64.ipk

开始正常找到依赖进行安装了,完事reboot重启驱动就挂上了

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Installing kmod-ath9k (5.4.137+5.10.42-1-1) to root...
Installing iw (5.9-8fab0c9e-2) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/iw_5.9-8fab0c9e-2_x86_64.ipk
Installing wireless-regdb (2021.04.21-1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/wireless-regdb_2021.04.21-1_all.ipk
Installing kmod-cfg80211 (5.4.137+5.10.42-1-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/packages/kmod-cfg80211_5.4.137%2b5.10.42-1-1_x86_64.ipk
Installing hostapd-common (2021-05-22-b102f19b-29) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/hostapd-common_2021-05-22-b102f19b-29_x86_64.ipk
Installing kmod-mac80211 (5.4.137+5.10.42-1-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/packages/kmod-mac80211_5.4.137%2b5.10.42-1-1_x86_64.ipk
Installing kmod-ath (5.4.137+5.10.42-1-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/packages/kmod-ath_5.4.137%2b5.10.42-1-1_x86_64.ipk
Installing kmod-ath9k-common (5.4.137+5.10.42-1-1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/packages/kmod-ath9k-common_5.4.137%2b5.10.42-1-1_x86_64.ipk
Configuring iw.
Configuring wireless-regdb.
Configuring kmod-cfg80211.
Configuring hostapd-common.
Configuring kmod-mac80211.
Configuring kmod-ath.
Configuring kmod-ath9k-common.
Configuring kmod-ath9k.

One thought on “OpenWRT opkg 安装软件包时内核版本不匹配问题解决

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注