前言
记录一些树莓派4B的记录,使用的是树莓派爱好者基地64位系统2.0正式版(Debian)的系统。
工具记录
- Raspberry Pi OS
- SDFormatter
- win32diskimager
- www.advanced-ip-scanner
- Debian-Pi-Aarch64
- balenaEtcher
基础设置
开启SSH
| 1
 | $ new-item ssh -type file
 | 
配置wifi连接文件
| 1
 | $ vim wpa_supplicant.conf
 | 
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 
 | country=CNctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
 update_config=1
 
 network={
 ssid="909"
 psk="1393877285"
 key_mgmt=WPA-PSK
 priority=1
 }
 
 network={
 ssid="WiFi-B"
 psk="12345678"
 key_mgmt=WPA-PSK
 priority=2
 scan_ssid=1
 }
 
 #ssid:网络的ssid
 #psk:密码
 #priority:连接优先级,数字越大优先级越高(不可以是负数)
 #scan_ssid:连接隐藏WiFi时需要指定该值为1
 
 | 
编译安装python3.9.9
更新系统
| 12
 
 | $ sudo apt update$ sudo apt upgrade
 
 | 
安装环境依赖
| 1
 | $ sudo apt install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev libffi-dev -y 
 | 
注意如果没安装libffi-dev的话可能会出现ModuleNotFoundError: No module named '_ctypes'错误
下载&解压
| 12
 3
 
 | $ wget https://npm.taobao.org/mirrors/python/3.9.9/Python-3.9.9.tgz$ tar zxvf Python-3.9.9.tgz
 $ cd Python-3.9.9
 
 | 
编译安装
| 12
 3
 4
 5
 6
 
 | # --enable-optimizations(优化参数 自选)$ sudo ./configure --enable-optimizations
 $ sudo make
 $ sudo make install
 # 等待完成检查
 $ ls -al /usr/local/bin/python*
 
 | 
添加PIP alias
| 1
 | alias pq3.9='sudo pip3.9 install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com'
 | 
替换默认Python
| 12
 3
 
 | $ sudo rm /usr/bin/python$ sudo ln -s /usr/bin/python3.9 /usr/bin/python
 $ python
 
 | 
安装oh-my-zsh
| 12
 3
 4
 5
 
 | $ sh -c "$(curl -fsSL https://ghproxy.com/https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"$ git clone https://ghproxy.com/https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
 $ git clone https://ghproxy.com/https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
 $ git clone https://ghproxy.com/https://github.com/zsh-users/zsh-completions ${ZSH_CUSTOM:=~/.oh-my-zsh/custom}/plugins/zsh-completions
 $ git clone https://ghproxy.com/https://github.com/dracula/zsh.git ${ZSH_CUSTOM:=~/.oh-my-zsh/themes/
 
 | 
结束
End