当前位置: 首页 > news >正文

Docker容器中的ubuntu apt update报错 解决办法

问题现象 

# apt update
Get:1 http://archive.ubuntu.com/ubuntu noble InRelease [256 kB]
Get:2 http://security.ubuntu.com/ubuntu noble-security InRelease [126 kB]
Err:2 http://security.ubuntu.com/ubuntu noble-security InRelease    
  At least one invalid signature was encountered.
Err:1 http://archive.ubuntu.com/ubuntu noble InRelease
  At least one invalid signature was encountered.
Get:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease [126 kB]
Err:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
  At least one invalid signature was encountered.
Get:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease [126 kB]
Err:4 http://archive.ubuntu.com/ubuntu noble-backports InRelease
  At least one invalid signature was encountered.
Reading package lists... Done
W: GPG error: http://security.ubuntu.com/ubuntu noble-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://security.ubuntu.com/ubuntu noble-security InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu noble InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu noble InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu noble-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu noble-updates InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://archive.ubuntu.com/ubuntu noble-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://archive.ubuntu.com/ubuntu noble-backports InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


 解决办法

 原因很大可能是历史apt下载的太多了清除一下缓存即可
# docker system df         // which can show disk usage and size of 'Build Cache'

# docker image prune       // add -f or --force to not prompt for confirmation

# docker container prune   // add -f or --force to not prompt for confirmation

相关文章:

  • 【58】编程技巧:单片机编程命名规范
  • Oracle数据库数据编程SQL<4.3 事务的补充内容(了解)>
  • 十、C++速通秘籍—多进程
  • 牛客春招刷题训练营 算法 Java 3月27日 杨辉三角的变形 计算日期到天数转换 而后单调
  • 详细介绍一下Vue3的实现原理?
  • Codecademy—— 交互式编程学习的乐园
  • leetcode215.数组中的第k个最大元素
  • intel-xpu-backend-for-triton绕过pytorch直接调用Unified-Runtime
  • 小程序31-wxml语法-setData() 修改数据
  • RTC实时时钟M41T11M6F国产替代FRTC4111S
  • vue3如何批量设置每个vue页面的defineOptions的name
  • Web Workers 技术解析与应用
  • # 基于 OpenCV 的人脸识别实战:从基础到进阶
  • 贪心进阶学习笔记
  • Elasticsearch简介及索引库操作
  • 全新开源PHP轻量级活码管理系统|支持二维码动态更新与自动失效机制
  • 【力扣hot100题】(064)在排序数组中查找元素的第一个和最后一个位置
  • 【Tauri2】015——前端的事件、方法和invoke函数
  • Docker常用操作教程
  • java发送http请求
  • fm网站开发/百度app官方下载安装
  • 设计师个人网站怎么做/湘潭网站seo磐石网络
  • 上海网站建设的网站/搜索引擎有哪些
  • 梭子手做鱼网站/网站开发建站
  • 网站建设入什么科目/广东省人大常委会
  • 评论回复网站怎么做的/网站营销与推广