linux - RTNETLINK 回答:设备或资源忙;ifup: 未能调出 wlxf4f26d13b2bd
问题描述
我正在尝试通过 /etc/network/interfaces 配置网络这是我的文件:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug usb0
iface usb0 inet dhcp
# The wifi network interface
iface wlxf4f26d13b2bd inet manual
hwaddress ether 2a:bf:x9:53:38:9d
wpa-driver nl80211
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
但是当我尝试激活设备时,ifup wlxf4f26d13b2bd
我得到:
> RTNETLINK answers: Device or resource busy ifup: failed to bring up
> wlxf4f26d13b2bd
我没有使用 NetworkManager。
这是 ifup 的详细输出:
ifup -v wlxf4f26d13b2bd
ifup: configuring interface wlxf4f26d13b2bd=wlxf4f26d13b2bd (inet)
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/macchanger
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: terminating wpa_supplicant daemon via pidfile /run/wpa_supplicant.wlxf4f26d13b2bd.pid
Stopped /sbin/wpa_supplicant (pid 1568).
wpa_supplicant: removing /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlxf4f26d13b2bd.pid
wpa_supplicant: wait for wpa_cli to attach
wpa_supplicant: wpa-driver nl80211
wpa_supplicant: /sbin/wpa_supplicant -s -B -P /run/wpa_supplicant.wlxf4f26d13b2bd.pid -i wlxf4f26d13b2bd -W -D nl80211 -c /etc/wpa_supplicant/wpa_supplicant.conf -C /run/wpa_supplicant
Starting /sbin/wpa_supplicant...
wpa_supplicant: creating sendsigs omission pidfile: /run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlxf4f26d13b2bd.pid
wpa_supplicant: ctrl_interface socket located at /run/wpa_supplicant/wlxf4f26d13b2bd
/sbin/ip link set dev wlxf4f26d13b2bd address 2a:bf:x9:53:38:9d
RTNETLINK answers: Device or resource busy
ifup: failed to bring up wlxf4f26d13b2bd
解决方案
我解决了这个问题。问题是它试图在 wpa_supplicant 配置之后更改 MAC 地址;不遵守文件中命令的顺序。简单的解决方案是pre-up macchanger -m
在 iface 节内设置 mac 地址,或者在 wpa-supplicant 之前调用 macchanger。谢谢!
推荐阅读
- c - 程序无法接收第二个输入
- swift - 如何从.components(separatedBy:CharacterSet)中获取非转义撇号
- javascript - Typescript - 如何从库中导入扩展方法
- html - 链接访问后无法更改锚标记的字体大小
- sql - 带计数的 SQL Server Pivot 子句
- asp.net-core - ASP.NET Identity Core:Web 场密码重置的无效令牌
- html - 从父级形成链接时href丢失参数值
- list - 将元组与元组列表进行比较
- python - Python中除法的余数
- python - 如何设置一个数据流窗口,在将所有记录写入 bigquery 后不断重新触发更多数据?