[Share Experiences] deepin v20.9 添加 debian 软件源
Tofloor
poster avatar
deepin
2023-11-30 00:42
Author

2023/11/29

由于本人的服务器用的是debian系统,正好deepin也是基于debian做出来的,所以我这个强迫症就想着折腾一下统一加上debian的源。

注:本人是单deepin系统,为了改个源已经重装了一次,恢复备份了3次。

操作

sudo vim /etc/apt/sources.list

然后加上 debian 10 的源,必须是 debian 10 的源。我尝试换到过debian11的源,需要更新1000+的软件包,并且附带各种冲突。

以下是阿里源,其他源可以网上找找

deb http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ buster-backports main non-free contrib
deb http://mirrors.aliyun.com/debian-security buster/updates main
deb-src http://mirrors.aliyun.com/debian-security buster/updates main

然后 sudo apt update

这时候执行 sudo apt upgrade 会提示有 50 左右可以更新的包,但不能直接用这个更新,不然 dbus 也会更新,然后重启就进不去桌面了。

执行 apt list --upgradable 列出全部可更新的包,然后挑选其中没有deepin后缀的包更新。

在我的系统中,最后只剩下这些包没有更新。

dbus-user-session/oldoldstable 1.12.28-0+deb10u1 amd64 [可从该版本升级:1.12.20.6-1+deepin]
dbus-x11/oldoldstable 1.12.28-0+deb10u1 amd64 [可从该版本升级:1.12.20.6-1+deepin]
dbus/oldoldstable 1.12.28-0+deb10u1 amd64 [可从该版本升级:1.12.20.6-1+deepin]
libdbus-1-3/oldoldstable 1.12.28-0+deb10u1 amd64 [可从该版本升级:1.12.20.6-1+deepin]
libssl-dev/oldoldstable 1.1.1n-0+deb10u6 amd64 [可从该版本升级:1.1.1d.17-deepin1]
libssl1.1/oldoldstable 1.1.1n-0+deb10u6 amd64 [可从该版本升级:1.1.1d.17-deepin1]

我尝试更新了 libdbus-1-3 但是重启直接进不去桌面,只能恢复备份,所以大概这样就已经更新完成了。

2023/11/30

尝试调整软件源,让一些 deepin 修改过的软件从源中去除

首先从 /etc/apt/sources.list 从去除新加的软件源,将新加的源放到 /etc/apt/sources.list.d 目录下:

新建一个文件 debian.list 放入源

然后根据软件包的分类,从 debian 软件源中去除 debian 发行版的部分,保留非 debian 发行版的部分,最后得到如下的源

deb http://mirrors.aliyun.com/debian/ buster  non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ buster  non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-updates  non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ buster-updates  non-free contrib
deb http://mirrors.aliyun.com/debian/ buster-backports  non-free contrib
#deb-src http://mirrors.aliyun.com/debian/ buster-backports  non-free contrib
#deb http://mirrors.aliyun.com/debian-security buster/updates  non-free contrib
#deb-src http://mirrors.aliyun.com/debian-security buster/updates  non-free contrib

执行 sudo apt update ,提示所有软件包皆为最新,基本结束

Reply Favorite View the author
All Replies
neko
deepin
Ecological co-builder
2023-11-30 00:52
#1

标准的错误示范XD

Reply View the author
忘记、过去
deepin
2023-11-30 01:00
#2

Deepin V20 早期和 Debian 10 buster 差不多,有些包可以直接从 buster 仓库拿。但是,从 20.2 开始,Deepin 更新了 Qt 5.15 以及新内核,在此之后就不建议随便混用仓库了......

Reply View the author
阿尼樱奈奈
Moderator
2023-11-30 01:07
#3

不建议混源,这样做系统很容易出问题

Reply View the author
hanzn-zzx
deepin
2023-11-30 02:59
#4

不要混源!不要混源!不要混源!

尤其是deepin23,已经半脱离debian,混源会导致很严重的后果!

deepin20也不建议

Reply View the author
wlly-lzh
deepin
2023-11-30 03:03
#5

哈哈,又是一个修炼混源大法的。

joy

Reply View the author
晚秋(lateautumn)
Moderator
2023-11-30 07:01
#6

厉害,学习了。like

Reply View the author
安洛
deepin
2023-11-30 08:03
#7

对于任何有类似需求的人,请阅读debian官方手册以获取最佳实践:https://www.debian.org/doc/manuals/debian-handbook/sect.apt-get.zh-cn.html#sect.apt-mix-distros

警告:任何情况下都不推荐混源。

Reply View the author
fuuko
deepin
2023-11-30 17:22
#8

混源大法么?这不得过两天就来论坛哭着求修系统了joy

Reply View the author
出售星辰之书的书商
Moderator
2023-11-30 17:35
#9

不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!不要混源!

Reply View the author
vivian_me
deepin testing team
2023-11-30 22:33
#10

友情提示:不要轻易操作哈

Reply View the author
魔法师
deepin
2023-12-01 07:23
#11

换源大师在此,已经经历过种种情况但稳如老狗,v23 换源一定会遇到这些事:

  1. 大量软件包冲突
  2. 某个微小安装操作可能会涉及卸载 dde 整体生态,但 linglong 里的应用不会被影响
  3. dde 卸载后你无法使用deepin终端,而我由于习惯在 vscode 中使用其内置终端所以可以进行补救
  4. 总之,你可以在 vscode 一边改 apt 源,一边在内置终端测试安装软件并记录操作
  5. 在 vscode 进行补救,重新安装 dde,你会发现如此涅槃重生后,你之前所有的种种软件包冲突仿佛完全消失。
  6. 以上操作是我的日常,非高手与老狗请不要模仿操作。
  7. 目前无任何事,并也用了几年的 deepin 从来没重装过
  8. 旧笔记本电脑从见买来就装linux用了几年 deepin 种种事都发生过,但就硬是没有过任何重装。
  9. 老手:一台新电脑只会装一次系统,并用到淘汰。
  10. 新手:系统一小时一换,一天一重装才是成为大佬的最快途径。

applaud

Reply View the author
空木蓮華
deepin
2023-12-01 23:39
#12

直接 docker + distrobox

Reply View the author
拼搏的那兔
deepin
2024-09-13 14:45
#13
魔法师

换源大师在此,已经经历过种种情况但稳如老狗,v23 换源一定会遇到这些事:

  1. 大量软件包冲突
  2. 某个微小安装操作可能会涉及卸载 dde 整体生态,但 linglong 里的应用不会被影响
  3. dde 卸载后你无法使用deepin终端,而我由于习惯在 vscode 中使用其内置终端所以可以进行补救
  4. 总之,你可以在 vscode 一边改 apt 源,一边在内置终端测试安装软件并记录操作
  5. 在 vscode 进行补救,重新安装 dde,你会发现如此涅槃重生后,你之前所有的种种软件包冲突仿佛完全消失。
  6. 以上操作是我的日常,非高手与老狗请不要模仿操作。
  7. 目前无任何事,并也用了几年的 deepin 从来没重装过
  8. 旧笔记本电脑从见买来就装linux用了几年 deepin 种种事都发生过,但就硬是没有过任何重装。
  9. 老手:一台新电脑只会装一次系统,并用到淘汰。
  10. 新手:系统一小时一换,一天一重装才是成为大佬的最快途径。

applaud

总结的非常好

Reply View the author