Skip to content

ARMreset Ubuntu 报错 #334

@usernameisnull

Description

@usernameisnull

你操作了什么?

在reset ubuntu的时候好像sed语句不对?

#0 6.207 [chsrc 运行] sed -E -i 's@https?://.*/ubuntu-ports/?@http://archive.ubuntu.com/ubuntu/-ports@g' /etc/apt/sources.list

版本

root@30347b3ef331:/opt/hadoop# /opt/tools/chsrc --version
chsrc v0.2.4 (2025/12/31)

Copyright (C) 2023-2025 曾奥然, 郭恒
许可证 GPLv3+:GNU GPL 第 3 版或更高版本 <https://gnu.org/licenses/gpl.html>
这是自由软件:您可以自由修改和分发它。
在法律允许的最大范围内,本软件按'原样'提供,不作任何明示或暗示的保证。

由作者:曾奥然、郭恒,协作者:Mikachu2333、Happy Game 以及各位贡献者开发。(详见 chsrc-main.c, 或 `chsrc ls <target>`)

发生了什么?

reset ubuntu失败

本应该怎么样?

期望应该能够reset成功

chsrc 版本

v0.2.4 (2025/12/31)

你使用的是哪个操作系统?

Linux

OS 版本 / OS 发行版

Ubuntu 22.04.4 LTS

Log 输出

#25 [linux/arm64 9/9] RUN /opt/tools/chsrc reset ubuntu
#0 0.769 
#0 0.770 WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#0 0.770 
#0 1.815 Get:1 https://deb.nodesource.com/node_20.x nodistro InRelease [12.1 kB]
#0 2.121 Ign:2 http://archive.ubuntu.com/ubuntu/-ports jammy InRelease
#0 2.416 Ign:3 http://archive.ubuntu.com/ubuntu/-ports jammy-updates InRelease
#0 2.712 Ign:4 http://archive.ubuntu.com/ubuntu/-ports jammy-backports InRelease
#0 3.009 Ign:5 http://archive.ubuntu.com/ubuntu/-ports jammy-security InRelease
#0 3.307 Err:6 http://archive.ubuntu.com/ubuntu/-ports jammy Release
#0 3.307   404  Not Found [IP: 185.125.190.83 80]
#0 3.600 Err:7 http://archive.ubuntu.com/ubuntu/-ports jammy-updates Release
#0 3.600   404  Not Found [IP: 185.125.190.83 80]
#0 3.896 Err:8 http://archive.ubuntu.com/ubuntu/-ports jammy-backports Release
#0 3.896   404  Not Found [IP: 185.125.190.83 80]
#0 4.192 Err:9 http://archive.ubuntu.com/ubuntu/-ports jammy-security Release
#0 4.192   404  Not Found [IP: 185.125.190.83 80]
#0 5.574 Get:10 https://deb.nodesource.com/node_20.x nodistro/main arm64 Packages [13.8 kB]
#0 5.980 Reading package lists...
#0 6.194 E: The repository 'http://archive.ubuntu.com/ubuntu/-ports jammy Release' does not have a Release file.
#0 6.194 E: The repository 'http://archive.ubuntu.com/ubuntu/-ports jammy-updates Release' does not have a Release file.
#0 6.194 E: The repository 'http://archive.ubuntu.com/ubuntu/-ports jammy-backports Release' does not have a Release file.
#0 6.194 E: The repository 'http://archive.ubuntu.com/ubuntu/-ports jammy-security Release' does not have a Release file.
#0 6.194 W: https://deb.nodesource.com/node_20.x/dists/nodistro/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
#0 6.206 chsrc: 关键错误,强制结束
#0 6.207 [chsrc 检查] x 文件 /etc/apt/sources.list.d/ubuntu.sources 不存在
#0 6.207 [chsrc 提醒] 将基于旧格式(非DEB822)换源
#0 6.207 [chsrc 检查] ✓ 文件 /etc/apt/sources.list 存在
#0 6.207 选中镜像站: Upstream (upstream)
#0 6.207 --------------------------------
#0 6.207 [chsrc 备份] /etc/apt/sources.list -> /etc/apt/sources.list.bak
#0 6.207 [chsrc 运行] sed -E -i 's@https?://.*/ubuntu-ports/?@http://archive.ubuntu.com/ubuntu/-ports@g' /etc/apt/sources.list
#0 6.207 [chsrc 运行] ✓ 命令执行成功
#0 6.207 
`
#0 6.207 [chsrc 运行] apt update
#0 6.207 [chsrc 运行] x 命令执行失败,退出状态: 25600
#25 ...
#24 [linux/amd64 9/9] RUN /opt/tools/chsrc reset ubuntu
#24 8.357 Get:10 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
#24 8.435 Get:11 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [69.2 kB]
#24 8.459 Get:12 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,600 kB]
 5 warnings found (use --debug to expand):

防止重复问题

  • 我已在项目中搜索过类似的 issue

Metadata

Metadata

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions