我的電腦上只有無線服務(我無法實際移動它以連接乙太網路)。
當我啟動 Linux 時,我看到一條錯誤訊息:(我將 wlp0... 替換為 )
[FAILED] Failed to start dhcpcd on <mywirelessinterface>. See 'systemctl status dhcpcd@<mywirelessinterface>.service’ for details.
好的,我這樣做:
# systemctl status dhcpcd@<mywirelessinterface>.service
* dhcpcd@<mywirelessinterface>.service - dhcpcd on <mywirelessinterface>
Loaded: loaded (/usr/lib/system/system/[email protected]: enabled)
Active: failed (Result: resources) since <recent date and time>
Process: 2918 ExecStart=/usr/bin/dhcpcd -q -w %I (code=exited, status=0/SUCCESS)
<Current date and time> localhost system[1]: PID file /run/dhcpcd-<mywirelessinterface>.pid not readable (yet?) after start.
<Current date and time> localhost system[1]: Failed to start dhcpcd on <mywirelessservice>.
Failed to start dhcpcd on <mywirelesscervice>.
<Current date and time> localhost system[1]: Unit dhcpcd@<mywirelessinterface>.service entered failed state.
當我使用 sudo su 手動啟動它時:
# systemctl start dhcpcd@<mywirelessinterface>.service
它以同樣的方式失敗:
Job for dhcpcd@<mywirelessinterface>.service failed. See ‘systemctl status netctl@<mywirelessinterface>\x2<mynetworkname>.service’ and ‘journalctl –xn’ for details.
雜誌上是這麼說的:
# journalctl -xn
-- Logs begin at <date, time>, end at <date, time>. --
<Current date and time> localhost dhcpcd[4366]: <mywirelessinterface> failed to start wpa_supplicant
<Current date and time> localhost dhcpcd[4367]: <mywirelessinterface> sucessfully initialized wpa_supplicant
Line 1062: unknown EAP method 'SIM'. You may need to add support for this EAP method during wpa_supplicant build time configuration. See README for more information.
Line 1062: failed to parse eap 'SIM'.
Line 1065: failed to parse network block.
Line 1072: unknown EAP method 'PSK'. You may need to add support for this EAP method during wpa_supplicant build time configuration. See README for more information.
Line 1072: failed to parse eap 'PSK'.
Line 1076: failed to parse network block.
Line 1108: unknown EAP method 'IKEV2'. You may need to add support for this EAP method during wpa_supplicant build time configuration. See README for more information.
Line 1108: failed to parse eap 'IKEV2'.
Line 1111: failed to parse network block.
Failed to read or parse configuration 'etc/wpa_supplicant/wpa_supplicant.conf'.
<Current date and time> localhost dhcpcd[213]: <mywirelessinterface>: waiting for carrier
<Current date and time> localhost dhcpcd[213]: <myotherinterface>: waiting for carrier
<Current date and time> localhost dhcpcd[213]: control command: /usr/sbin/dhcpcd -k <myotherinterface>
<Current date and time> localhost dhcpcd[213]: <myotherinterface> removing interface
<Current date and time> localhost kernel: IPv6: ADDRCONF(NETDEV_UP): <mywirelessinterface>: link is not ready
<Current date and time> localhost kernel: ieee80211 phy0: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 10 in queue 0
<Current date and time> localhost kernel: ieee80211 phy0: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 10 in queue 0
<Current date and time> localhost kernel: ieee80211 phy0: rt2800usb_entry_txstatus_timeout: Warning - TX status timeout for entry 10 in queue 0
我確實嘗試過 ip link, iw dev
ip link set <mywirelessinterface> up
沒有幫助。我還沒有使用過 /etc/dhcpcd.conf 並且我不知道 wpa_supplicant 設定檔是否存在。我只是還不知道它們是什麼。幫助!
答案1
基本上,這是 wpa_supplicant 的問題:預設的 /etc/wpa_supplicant.conf 基本上都是關於文件的,它是不是有效的設定檔。以下是有效文件的簡單範例:
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1
fast_reauth=0
network={
ssid="WifiNetworkName"
key_mgmt=WPA-PSK
psk="WifiNetworkPassword"
priority=5
}
您可能想要保留舊版本(例如,只需將其重新命名為 /etc/wpa_supplicant_old.conf),因為它包含許多有用的範例。
或者,您可以透過安裝網路管理員讓您的生活變得更加簡單:有很多,netctl,wicd,我個人更喜歡 NetworkManager。你可以找到在維基百科中您需要的所有說明。只需記住停用嘗試為您管理連線的任何其他服務,您可以使用以下命令列出所有已啟用的服務
sudo systemctl --type=service
答案2
我有類似的問題。我有一個 wifi 配置文件,但在我啟動dhcpcd
有線網路後它無法啟動。
為了解決這個問題,我禁用了所有dhcpcd
服務netctl
並重新啟動了系統;然後它重新讀取 wifi 設定檔並再次激活
我希望這對你有幫助,我用過類似的東西:
sudo systemctl disable dhcpcd.service
sudo systemctl disable netctl.service
sudo reboot