首页 > 解决方案 > 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

标签: linuxnetworkingdebianwireless

解决方案


我解决了这个问题。问题是它试图在 wpa_supplicant 配置之后更改 MAC 地址;不遵守文件中命令的顺序。简单的解决方案是pre-up macchanger -m在 iface 节内设置 mac 地址,或者在 wpa-supplicant 之前调用 macchanger。谢谢!


推荐阅读