标签:stc 替换 镜像 upd ports conf ati etc bind
方法一:命令行方法
***
sudo dd bs=4m if=2017-11-29-raspbian-stretch.img of=/dev/rdisk4
其中if参数为镜像文件,of参数为设备名称。但是烧写系统进sd卡前需要一个准备工作,其一是将sd卡抹掉格式化一下,然后卸载sd卡分区,最后将系统烧进指定sdk位置。
抹掉sd卡很简单,mac的磁盘工具,选中sd卡,点抹掉,格式选择MS-DOS(FAT)。
df -h
得到挂载的SD卡位置(卷),比如/dev/disk4s1
。
然后使用卸载这个分区
diskutil unmount /dev/disk4s1
获得我们要安装系统的设备
diskutil list
最终得到的就是
sudo dd bs=4m if=2017-11-29-raspbian-stretch.img of=/dev/rdisk4
最后安全退出sd卡
diskutil unmountDisk /dev/disk4
方法二:使用烧录软件balenaEtcher
ssh
raspi-config
sudo apt install raspi-config
打开raspi-config
sudo raspi-config
设置ssh
开启如下图
选择Interfacing options
选择SSH
选择ok
:::alert-success
至此树莓派SSH开启成功
:::
ssh
连接树莓派ifconfig
ssh pi@ip
查看磁盘空间
df -h
使用系统工具扩容
sudo raspi-config
然后在选择Advancd Options -> Expand Filesystem
重启后空间即为整个SD卡空间
安装dphys-swapfile
sudo apt install dphys-swapfile
编辑dphys-swapfile
扩展空间
sudo nano /etc/dphys-swapfile
nano /etc/apt/sources.list
deb http://ports.ubuntu.com/ xenial main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial main restricted universe multiverse
deb http://ports.ubuntu.com/ xenial-updates main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial-updates main restricted universe multiverse
deb http://ports.ubuntu.com/ xenial-security main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial-security main restricted universe multiverse
deb http://ports.ubuntu.com/ xenial-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ xenial-backports main restricted universe multiverse
sudo apt update
sudo apt-get update && sudo apt-get install build-essential software-properties-common -y && sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get update && sudo apt-get install gcc-snapshot -y && sudo apt-get update && sudo apt-get install gcc-6 g++-6 -y && sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6
sudo apt install git libssl-dev libusb-1.0-0-dev pkg-config -y
sudo apt install cmake python3-dev raspberrypi-kernel-headers -y
sudo apt install libglu-dev
cd ~
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
sudo cp config/99-realsense-libusb.rules /etc/udev/rules.d/
sudo udevadm control --reload-rules && udevadm trigger
mkdir build
cd build
rm CMakeCache.txt
export CC=/usr/bin/gcc-6
export CXX=/usr/bin/g++-6
cmake -D CMAKE_BUILD_TYPE="Release"-D FORCE_LIBUVC=ON -D BUILD_PYTHON_BINDINGS=ON -D BUILD_EXAMPLES=ON ..
安装libx11-dev
sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev
如果报错 “The RandR library and headers were not found”
则需要在terminal
里执行
sudo apt-get install libxrandr-dev
如果报错 The XInput library and headers were not found
则需要在terminal
里执行
sudo apt-get install libxi-dev
如果报错 The Xinerama library and headers were not found
sudo apt-get install libxinerama-dev
如果报错The Xcursor libraries and headers were not found
sudo apt-get install libxcursor-dev
如果报错 Could NOT find OpenGL
sudo apt install libgl1-mesa-dev
sudo apt install libglu-dev
报警告找不到apriltap
vncserver
标签:stc 替换 镜像 upd ports conf ati etc bind
原文地址:https://www.cnblogs.com/hellocxz/p/12104310.html