说明:
- 如果是debian9,参考另一篇博文:https://editor.csdn.net/md/?articleId=133673149
准备工作
- 下载Debian12镜像(极简版)
- 下载wm 17pro
网络设置
配置apt的源
- 这个是debian12,则国内的源地址是:
- nano /etc/apt/sources.list # 用于设置apt的源
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
安装常用软件
- ssh服务:apt-get install openssh-server
- lsof 服务: apt install lsof
- netstat 服务: apt install net-tools
设置swapon的交换内存空间
配置pip的源的方法
- pip install pymysql -i https://mirrors.aliyun.com/pypi/simple/
- 设置永久的pip源地址:
- 参考网站:https://blog.csdn.net/qq_33182424/article/details/107072904
遇到的问题
- 1.在设置DHCP的时候错误了
- 错误截图:
![在这里插入图片描述](https://i-blog.csdnimg.cn/blog_migrate/de2c219e403281ce1e939370ace7975a.png)
- 在安装的时候出现上面的问题,先跳过执行
- 按照上面的网络进行配置即可,看到DHCP就会自动的分配一个ip
- 上面没有写清楚,参考https://cloud.tencent.com/developer/article/1726738 配置如下:
- auto eth0 iface eth0 inet dhcp 实际没有效果
- 按照网页设置,是可以设置好静态的ip的,但是还是无法ping通’www.baidu.com’网页
- 2.connect: network is unreachable
- 3.swapon,mkswap 命令找不到
- 增加了清华源的所有的数据再使用apt-get update试试重新安装
-
- pip install torch error: externally-managed-environment?
- 解决方案:sudo mv /usr/lib/python3.11/EXTERNALLY-MANAGED /usr/lib/python3.11/EXTERNALLY-MANAGED.old 即可