Networkmanager

無法在日誌中初始化控制介面 /run/wpa_supplicant 但 wlan 可以工作

  • December 12, 2020

無線區域網路工作,但我有這個日誌條目journalctl -b -p 3。這是什麼原因造成的?

Dec 11 21:26:09 raspberrypi wpa_supplicant[440]: Failed to initialize control interface '/run/wpa_supplicant'.
                                                You may have another wpa_supplicant process already running or the file was
                                                left by an unclean termination of wpa_supplicant in which case you will need
                                                to manually remove this file before starting wpa_supplicant again.
Dec 11 21:26:09 raspberrypi NetworkManager[433]: <error> [1607718369.9284] sup-iface[0x2a0450,wlan0]: error adding interface: wpa_supplicant couldn't grab this interfac

cat /etc/wpa_supplicant.conf

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
network={
   ssid="foo"
   psk="bar"
}

您需要停止NetworkManager使用wpasupplicant.

sudo systemctl stop NetworkManager

殺死所有wpasupplicant實例:

sudo killall wpasupplicant

或者

sudo killall wpa_supplicant

要完全禁用該NetworkManager服務,請使用:

sudo systemctl disable NetworkManager

引用自:https://unix.stackexchange.com/questions/624057