Debian国内及全球镜像源
<div class="postBody"><div id="cnblogs_post_body" class="blogpost-body cnblogs-markdown">
<h1>官方列出的全球镜像源:https://www.debian.org/mirror/list.zh-cn.html</h1>
<h1 id="修改源">修改源</h1>
<p>注意:</p>
<p>在改为国内源后,如果update或upgrade时,会提示“由于没有公钥,无法验证下列签名”,解决办法是安装debian-archive-keyring即可。</p>
<pre class="language-bash highlighter-hljs" data-dark-theme="true"><code>sudo apt-get install debian-archive-keyring</code></pre>
<p>然后运行apt update和apt upgrade即可。</p>
<div class="cnblogs_Highlighter sh-gutter">
<pre class="brush:Perl;gutter:true;collapse:false">vim /etc/apt/sources.list</pre>
</div>
<p> 以下为debian 12.0版本的源,需根据自己版本调整。</p>
<p><span style="font-size: 18px; font-family: "Microsoft YaHei""><strong><span style="color: rgba(224, 62, 45, 1)">推荐伯克利的镜像源:</span></strong></span></p>
<pre class="language-yaml highlighter-hljs" data-dark-theme="true"><code>deb https://mirrors.ocf.berkeley.edu/debianbookworm contrib main non-free non-free-firmware
deb-src https://mirrors.ocf.berkeley.edu/debianbookworm contrib main non-free non-free-firmware
deb https://mirrors.ocf.berkeley.edu/debianbookworm-backports contrib main non-free non-free-firmware
deb-src https://mirrors.ocf.berkeley.edu/debianbookworm-backports contrib main non-free non-free-firmware
deb https://mirrors.ocf.berkeley.edu/debian-security/bookworm-security main
deb-src https://mirrors.ocf.berkeley.edu/debian-security/bookworm-security main
deb https://mirrors.ocf.berkeley.edu/debianbookworm-updates contrib main non-free non-free-firmware
deb-src https://mirrors.ocf.berkeley.edu/debianbookworm-updates contrib main non-free non-free-firmware</code></pre>
<p><span style="font-size: 18px; font-family: 黑体"><strong>美国的一些源:</strong></span></p>
<pre class="language-yaml highlighter-hljs" data-dark-theme="true"><code>deb http://ftp.us.debian.org/debian/ bookworm main non-free non-free-firmware contrib
deb-src http://ftp.us.debian.org/debian/ bookworm main non-free non-free-firmware contrib
deb http://ftp.us.debian.org/debian-security/ bookworm-security main
deb-src http://ftp.us.debian.org/debian-security/ bookworm-security main
deb http://ftp.us.debian.org/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src http://ftp.us.debian.org/debian/ bookworm-updates main non-free non-free-firmware contrib
deb http://ftp.us.debian.org/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src http://ftp.us.debian.org/debian/ bookworm-backports main non-free non-free-firmware contrib</code></pre>
<p> </p>
<p><strong><span style="font-size: 18px"> 阿里云源</span></strong></p>
<div class="cnblogs_Highlighter sh-gutter">
<pre class="brush:Perl;gutter:true;collapse:false">deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib</pre>
</div>
<p><span style="font-size: 18px"><strong> 清华大学源</strong></span></p>
<div class="cnblogs_Highlighter sh-gutter">
<pre class="brush:Perl;gutter:true;collapse:false">deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bookworm-security main
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib</pre>
</div>
<p> </p>
<p><strong><span style="font-size: 18px">中科大源</span></strong></p>
<div class="cnblogs_Highlighter sh-gutter">
<pre class="brush:Perl;gutter:true;collapse:false">deb https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main non-free non-free-firmware contrib</pre>
</div>
<p> </p>
<p><span style="font-size: 18px"><strong>网易源</strong></span></p>
<div class="cnblogs_Highlighter sh-gutter">
<pre class="brush:Perl;gutter:true;collapse:false">deb https://mirrors.163.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.163.com/debian-security/ bookworm-security main
deb-src https://mirrors.163.com/debian-security/ bookworm-security main
deb https://mirrors.163.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.163.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.163.com/debian/ bookworm-backports main non-free non-free-firmware contrib</pre>
</div>
<p> </p>
<p><span style="font-size: 18px"><strong>腾讯云源</strong></span></p>
<div class="cnblogs_Highlighter sh-gutter">
<pre class="brush:Perl;gutter:true;collapse:false">deb https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.cloud.tencent.com/debian-security/ bookworm-security main
deb-src https://mirrors.cloud.tencent.com/debian-security/ bookworm-security main
deb https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib</pre>
</div>
<p> </p>
<p><strong><span style="font-size: 18px">更新源</span></strong></p>
<div class="cnblogs_Highlighter sh-gutter">
<pre class="brush:Perl;gutter:true;collapse:false">apt update</pre>
</div>
<p>====================================================================================</p>
<p>安装 nvidia 驱动</p>
<p> 配置源文件,nvidia 驱动需要启用 contrib 和 non-free 分支 ,你也可以直接复制下面这个清华大学镜像源</p>
<p>deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware<br>deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware<br>deb http://mirrors.tuna.tsinghua.edu.cn/debian-security bookworm-security main contrib non-free non-free-firmware</p>
<p> 2.刷新源</p>
<p>apt update</p>
<p> 3.安装 headers 和 dkms</p>
<p>apt install linux-headers-amd64 dkms</p>
<p> 4.安装nvidia驱动</p>
<p>apt install nvidia-driver firmware-misc-nonfree</p>
<p>这样就安装好了,至于禁用 nouveau 驱动不用特别处理,官方的包都已经自动帮你配置好了,安装过程你只需要敲一次回车确认会帮你禁用的,然后重启,就能使用nvidia驱动了</p>
</div>
</div>
<div id="cnblogs_post_body" class="blogpost-body cnblogs-markdown">
<table class="hljs-ln">
<tbody>
<tr>
<td class="hljs-ln-line hljs-ln-code" data-line-number="1"> </td>
</tr>
</tbody>
</table>
</div><br><br>
来源:https://www.cnblogs.com/merrynuts/p/17783966.html
頁:
[1]