本文主要是介绍树莓派:[FAILED] Failed to start /etc/rc.local Compatibility.,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
树莓派启动报错
1、问题描述:
给树莓派更新了内核后,启动时出现该问题。
2、解决方法
sudo vi /etc/rc.local #打开启动失败的rc.local文件
#!/bin/sh -e # 将该行改成第2行就行了
#!/bin/bash #酱紫...
# rc.local
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
# In order to enable or disable this script just change the execution
# bits.
# By default this script does nothing.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; thenprintf "My IP address is %s\n" "$_IP"
fi
config wlan0 192.168.1.117 #固定IP地址
exit 0
3、完成后的测试
sudo reboot # 重启树莓派
成功!
这篇关于树莓派:[FAILED] Failed to start /etc/rc.local Compatibility.的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!