码农之家

树莓派知识解答

前言

我们经常遇到一些开发项目,需要一些开发环境的简单配置。这篇文章我将总结一些常见的一些问题和解决办法。

正文

如何开启SPI总线?

sudo raspi-config

选择”Advanced Option” 里面有一个”SPI”,我们选择Enable(打开)就行了

如何开启管理员权限?

sudo passwd root
sudo passwd --unlock root
su root//切换管理员用户

如何解决git下载速度过慢问题?

bash <(curl -L -s https://install.direct/go.sh)//下载v2ray
sudo nano /etc/v2ray/config.json//对v2ray客户端进行配置,需要设置树莓派时区
sudo service v2ray restart//重启服务
//配置代理
git config --global http.https://github.com.proxy socks5://127.0.0.1:1086
git config --global https.https://github.com.proxy socks5://127.0.0.1:1086

如何安装node?

curl -sL https://deb.nodesource.com/setup_9.x| sudo -E bash -
sudo apt-get install -y nodejs