树莓派4+ Raspberry Pi OS with desktop and recommended software

1.使用TF卡,下载安装包,
网址:https://www.raspberrypi.com/software/operating-systems/
安装包链接
https://downloads.raspberrypi.org/raspios_full_armhf/images/raspios_full_armhf-2022-04-07/2022-04-04-raspios-bullseye-armhf-full.img.xz

2.把系统安装在TF卡
在windowsw使用win32 disk image即可,也可以使用树莓派自带的软件

3.进入系统,安装常用软件

apt-get install -y vim
apt-get install -y make
apt-get install -y automake
apt-get install -y gcc

#安装wifi管理软件
apt-get install -y iw

#安装USB管理软件
apt-get install -y usbutils 

#安装v4l软件

apt-get install -y v4l-utils 

#安装 NTFS 软件
apt-get install -y ntfs-3g

#unzip
apt-get install -y zip unzip 

apt-get install -y cpio

#准备软件
apt-get install -y gcc 
apt-get install -y gimp
apt-get install -y swig 
apt-get install -y libtool
apt-get install -y nasm 
apt-get install -y autoconf 
apt-get install -y automake 
apt-get install -y git 

apt-get install -y mercurial 

apt-get install -y libcurl3
apt-get install -y cmake
apt-get install -y yasm

#firewall
apt-get install -y ufw

#
apt-get install -y chkconfig

4.安装zlib,由于直接安装失败,我是通过源码安装的

yum -y install zlib -y
wget  http://10.8.0.24:18888/Download/armhf/zlib-1.2.11.tar.gz
tar -zxvf zlib-1.2.11.tar.gz
cd zlib-1.2.11
./configure
make && make install

5.安装pkg-config

cd /opt/pkg 
wget http://pkgconfig.freedesktop.org/releases/pkg-config-0.29.2.tar.gz
tar xvf pkg-config-0.29.2.tar.gz 
cd pkg-config-0.29.2
./configure --prefix=/usr/local/pkg-config --with-internal-glib 
make
make install

6. 树莓派pip更换国内源

pip install pipsource
#查看当前有哪些可靠的源
pipsource list
#查看哪些源我们已经配置为可使用的
pipsource show

输入sudo vim /etc/pip.conf
原来是https://www.piwheels.org/simple/这个库是最全的,有一些库必须用这个下载,国内的全都不行。
在文件最后加一句
extra-index-url=https://mirrors.aliyun.com/pypi/simple/

7.树莓派 apt-get 换清华源

我们需要先修改sources.list文件的配置:
sudo vim /etc/apt/sources.list
注释掉源文件的配置内容,替换成清华源:

deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi

然后修改raspi.list文件的配置:
sudo vim /etc/apt/sources.list.d/raspi.list
注释掉源文件的配置内容,替换成清华源:

deb http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui
deb-src http://mirror.tuna.tsinghua.edu.cn/raspberrypi/ stretch main ui

8.

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注