Debian source_list初次踩坑

打印 上一主题 下一主题

主题 977|帖子 977|积分 2931

安装

初次安装使用Debain,下载了最新的Debain安装镜像;下载地点,下载了文件debian-12.8.0-amd64-DVD-1.iso;
而后通过,VMWare安装了虚拟机。
账号设置

安装过程中,会提示设置root账号及自界说账号xxxx,但是默认不能使用root账号,自界说的xxxx账号也没有sudo权限,所以需要通过recover模式登录root账号,然后将xxxx账号到场sudo组。
usermod -aG sudo xxxx
设置软件源

通过百度得知需要设置的软件源如下:
deb http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye main non-free contrib
deb http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main non-free contrib
deb http://mirrors.aliyun.com/debian-security/ bullseye/updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian-security/ bullseye/updates main non-free contrib
安装软件

因为默认安装中不包罗gcc和g++,所以通过sudo apt install gcc g++的方式安装。下令开始实验但是提示有libc6-dev存在辩论,导致安装失败。
而后通过百度搜索,提示首先安装aptitude,而后实验通过aptitude install g++,来办理该问题,实验了许多次发现依然未能办理问题;
当中以为是提前安装了某些软件,导致了辩论,视图重新安装操作体系,在全新的环境进行apt install gcc g++依然存在问题。
后面,换了DeepSeek查询Debian的阿里云镜像源,得到的镜像列表如下:
deb http://mirrors.aliyun.com/debian/ bookworm main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ bookworm main non-free contrib
deb http://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free
deb-src http://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free
deb http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free
deb http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free
deb-src http://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free
同时其也给出了其他镜像源的列表,如下:

不难发现,之前设置的镜像源究竟上是Debian 11所匹配的镜像源,而我现实安装的是Debian 12;从而导致了意想不到的问题。
把镜像源修改为bookworm,对应的镜像源后,使用apt install gcc g++后就都很容易就成功了。
总结

个人初次使用Debian,对镜像源的各个字段含义实在不是很清晰,通过百度AI引擎拿到答案后,就直接用了;出现问题后,依然是继承搜索,发现进入了死胡同。换了一个思路后,恰好找到了办理方案,也算是运气好了,要否则会耗费更多的时间进行处置处罚。
究竟上,在发现apt install g++失败后,我也是使用了DeepSeek进行提问,查找答案的;给出的答案是使用aptitude install进行办理(确实是常用技能);但究竟上更深层次的问题竟然是起始设置的错误。
感想:
1:百度AI练习的实时性,大概已经掉队了;
2:假如一开始就使用了最新的DeepSeek搜索拿到的镜像源,估计软件安装会顺畅许多;(不外,假如不犯这个错误,大概我也会对镜像源中的名字字段的含义不会有过多的关注了)

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

渣渣兔

金牌会员
这个人很懒什么都没写!
快速回复 返回顶部 返回列表