-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mirror-help: add ubuntu-ports.md #86
Open
LengmoAngel
wants to merge
5
commits into
sjtug:master
Choose a base branch
from
LengmoAngel:patch-2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7a5c23f
mirror-help: add ubuntu-ports.md
LengmoAngel 2da32b5
mirror-help:Update content/post/mirror-help/ubuntu-ports.md
LengmoAngel f22d02d
mirror-help:Update content/post/mirror-help/ubuntu-ports.md
LengmoAngel 236f8d5
Create ubuntu-ports.md
LengmoAngel e07837c
mirror-help: update ubuntu-ports.md
LengmoAngel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
+++ | ||
title = "ubuntu-ports" | ||
tags = ["mirror-help"] | ||
author = "LengmoAngel" | ||
+++ | ||
|
||
Ubuntu 是一个基于 Debian 的 Linux 发行版,包含了常用的大量软件包。Ubuntu 的目标在于为一般用户提供一个最新同时又相当稳定,主要以自由软件建构而成的作业系统。Ubuntu 目前具有庞大的社群力量支持,用户可以方便地从社群获得帮助。 | ||
|
||
本镜像收录 arm64, armhf, PowerPC, ppc64el, s390x 等结构的软件。 | ||
|
||
镜像站一天同步一次 Ubuntu 镜像。为了取得最新的安全更新,我们不建议您将 security.ubuntu.com 换成镜像源。 | ||
|
||
您也可使用sudo sed -i 's/http:\/\/cn.archive.ubuntu.com/http:\/\/mirrors.sjtug.sjtu.edu.cn/g' /etc/apt/sources.list指令直接批量修改。 | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
测试了,是可以的,不是 arm 环境是 x86 环境。我觉得硬替换应该没问题吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
印象里 ubuntu-ports 的默认源是不带 cn 的,还是要之后确认一下。这个 PR 暂且搁置。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我也没有类似的设备 暂且搁置吧
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
虽然我觉得可以做一个类似于这个https://github.com/tuna/oh-my-tuna 虽然是愚人节玩笑
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
暂时没有精力维护更多项目 😂 😂 😂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ubuntu-ports 默认源都是类似
deb http://ports.ubuntu.com/ubuntu-ports/ focal main restricted
这种。这个可以用docker很容易看到,如
docker run -it --rm ubuntu@sha256:26c3bd3ae441c873a210200bcbb975ffd2bbf0c0841a4584f4476c8a5b8f3d99 cat /etc/apt/sources.list
所以应该使用类似
sudo sed -i 's|ports.ubuntu.com|mirror.sjtu.edu.cn|g' /etc/apt/sources.list
进行一键替换。There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
争取过几天去真机 例如树莓派 nVidia开发板上面跑跑看
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
其实 ubuntu 源里有个cn就很奇怪,镜像里都是没有的,所以这应该是本地初始化时加的,脚本里直接绝对匹配cn这不合理。
ports也有http://cn.ports.ubuntu.com/ 的源。树莓派镜像里没有桌面环境,安装后没有本地化引导应该不会加cn。
sed -i 's|\(cn.\)\?ports.ubuntu.com|mirror.sjtu.edu.cn|g' /etc/apt/sources.list
可选cn就行了(按理说在基本正则里.是通配符,好多人都没打转义符直接用,我也懒得打了)