docker 内apt-get安装软件都不好使

报各种错误

apt-get install --no-install-recommends libboost-all-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:autoconf automake autotools-dev cpp-8 gcc-8 gcc-8-base gfortran-8 ibverbs-providers icu-devtools libboost-atomic-dev libboost-atomic1.71-dev libboost-atomic1.71.0 libboost-chrono-dev libboost-chrono1.71-devlibboost-chrono1.71.0 libboost-container-dev libboost-container1.71-dev libboost-container1.71.0 libboost-context-dev libboost-context1.71-dev libboost-context1.71.0 libboost-coroutine-devlibboost-coroutine1.71-dev libboost-coroutine1.71.0 libboost-date-time-dev libboost-date-time1.71-dev libboost-date-time1.71.0 libboost-dev libboost-exception-dev libboost-exception1.71-devlibboost-fiber-dev libboost-fiber1.71-dev libboost-fiber1.71.0 libboost-filesystem-dev libboost-filesystem1.71-dev libboost-filesystem1.71.0 libboost-graph-dev libboost-graph-parallel-devlibboost-graph-parallel1.71-dev libboost-graph-parallel1.71.0 libboost-graph1.71-dev libboost-graph1.71.0 libboost-iostreams-dev libboost-iostreams1.71-dev libboost-iostreams1.71.0 libboost-locale-devlibboost-locale1.71-dev libboost-locale1.71.0 libboost-log-dev libboost-log1.71-dev libboost-log1.71.0 libboost-math-dev libboost-math1.71-dev libboost-math1.71.0 libboost-mpi-dev libboost-mpi-python-devlibboost-mpi-python1.71-dev libboost-mpi-python1.71.0 libboost-mpi1.71-dev libboost-mpi1.71.0 libboost-numpy-dev libboost-numpy1.71-dev libboost-numpy1.71.0 libboost-program-options-devlibboost-program-options1.71-dev libboost-program-options1.71.0 libboost-python-dev libboost-python1.71-dev libboost-python1.71.0 libboost-random-dev libboost-random1.71-dev libboost-random1.71.0libboost-regex-dev libboost-regex1.71-dev libboost-regex1.71.0 libboost-serialization-dev libboost-serialization1.71-dev libboost-serialization1.71.0 libboost-stacktrace-dev libboost-stacktrace1.71-devlibboost-stacktrace1.71.0 libboost-system-dev libboost-system1.71-dev libboost-system1.71.0 libboostGet:162 http://archive.ubuntu.com/ubuntu focal/universe amd64 libboost-all-dev amd64 1.71.0.0ubuntu2 [2468 B]                                                                                                     
Fetched 81.1 MB in 48s (1703 kB/s)                                                                                                                                                                                
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata_2021e-0ubuntu0.20.04_all.deb  404  Not Found [IP: 185.125.190.36 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libxml2/libxml2_2.9.10+dfsg-5ubuntu0.20.04.2_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb5support0_1.17-6ubuntu4.1_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/k/krb5/libk5crypto3_1.17-6ubuntu4.1_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb5-3_1.17-6ubuntu4.1_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/k/krb5/libgssapi-krb5-2_1.17-6ubuntu4.1_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-data_1.6.9-2ubuntu1.2_all.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/libx/libx11/libx11-6_1.6.9-2ubuntu1.2_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/o/openssh/openssh-client_8.2p1-4ubuntu0.4_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-10/libgfortran5_10.3.0-1ubuntu1~20.04_amd64.deb  404  Not Found [IP: 91.189.91.82 80]
E: Failed to fetch https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64/./libxnvctrl0_510.47.03-0ubuntu1_amd64.deb  File has unexpected size (20538 != 20534). Mirror sync in progress? [IP: 125.44.162.14 443]Hashes of expected file:- SHA512:626db3993ebe3a789cf5ef19a1a3c7393bca3eb24ab17a5740ace35d2221285692b04f26d6514a24537312b82bc96605a6052c8133a15acc2a0cf2d9f12c2e22- SHA256:24f5df1f1f4b1d3fa7338ea4f7e15d5f0572f37e0980ba04c37eb78e0a9350b2- SHA1:db9c7d697a247eed8670fe25c6082d3a9e8f585a [weak]- MD5Sum:3d24bb65fb940f1ab11ec1d7b6f90dcf [weak]- Filesize:20534 [weak]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?apt-get install --no-install-recommends libboost-all-dev^C
apt-get update
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                  
Hit:4 http://archive.ubuntu.com/ubuntu focal InRelease                                                     
Get:1 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64  InRelease [1581 B]
Err:1 https://developer.download.nvidia.cn/compute/cuda/repos/ubuntu2004/x86_64  InReleaseThe following signatures couldn't be verified because the public key is not available: NO_PUBKEY A4B469963BF863CC
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]        
Get:6 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [2942 kB]      
Get:7 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
root@2350fceda618:/d# apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libprotobuf-dev is already the newest version (3.0.0-9.1ubuntu1.1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:The following packages have unmet dependencies:libhdf5-serial-dev : Depends: libhdf5-dev but it is not going to be installedlibopencv-dev : Depends: libopencv-calib3d-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-contrib-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-features2d-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-highgui-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-objdetect-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-stitching-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-superres-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-videoio-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-videostab-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-viz-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv3.2-java (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installedDepends: libopencv-calib3d3.2 but it is not going to be installedDepends: libopencv-contrib3.2 but it is not going to be installedDepends: libopencv-features2d3.2 but it is not going to be installedDepends: libopencv-highgui3.2 but it is not going to be installedDepends: libopencv-videoio3.2 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Hash Sum mismatch when doing apt-get update and apt-get dist-upgrade

stderr: auto-detected mode as 'legacy'

各种奇葩问题。。。

最后各种百度查看资料,说源的问题,但是我源已经换成国内阿里云清华源等,还是不行啊!
我把我本地ubuntu1804系统上面的source.list拷贝上去还是不行!

# deb cdrom:[Ubuntu 18.04.5 LTS _Bionic Beaver_ - Release amd64 (20200806.1)]/ bionic main restricted
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partnerdeb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu bionic stable
# deb-src [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu bionic stable
deb http://security.ubuntu.com/ubuntu xenial-security main
# deb-src http://security.ubuntu.com/ubuntu xenial-security main
deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable

然后看到focal bionic,
ubuntu1804系统用bionic
ubuntu2004用focal
但是我用uname -a 这个命令显示docker里面是1804系统啊, 因为在docker里面
lsb_release -a这个指令没有安装不好用,装也不好装报错!

这样也可以看: cat /etc/lsb-release

root@2350fceda618:/etc/apt# uname  -a
Linux 2350fceda618 5.4.0-99-generic #112~18.04.1-Ubuntu SMP Thu Feb 3 14:09:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

但是没招了,我就把/etc/apt/sources.list里面的bionic改focal,然后
apt-get update
apt-get upgrade
这回果真不一样了,更新了好多东西。然后安装软件也可以了!
把lsb_release安装上,我擦!显示的是ubuntu20.04!!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/51977.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

索引设计规范

索引是帮助数据库高效获取数据的数据结构。索引是加速查询的常用技术手段。在设计索引时,要遵循索引设计规范,避免不必要的踩坑。 【推荐】索引存储结构推荐BTREE InnoDB和MyISAM存储引擎表,索引类型必须为BTRER,MEMORY表可以根…

vue2 vue中的常用指令

一、为什么要学习Vue 1.前端必备技能 2.岗位多,绝大互联网公司都在使用Vue 3.提高开发效率 4.高薪必备技能(Vue2Vue3) 二、什么是Vue 概念:Vue (读音 /vjuː/,类似于 view) 是一套 **构建用户界面 ** 的 渐进式 …

go:正确引入自己编写的包(如何在 Go 中正确引入自己编写的包)

前言 目录如下: 具体教程 1. 工作空间(我的是根目录)新建 go.work 文件 文件内容如下: go 1.21.0use (./tuchuang./tuchuang/testm ) 2. 添加go.mod文件 1. 包文件夹下 进入testm目录执行 go mod init testModule 2. 引用目…

设计模式——装饰器模式

装饰器模式 装饰器模式(Decorator Pattern)允许向一个现有的对象添加新的功能,同时又不改变其结构。这种类型的设计模式属于结构型模式,它是作为现有的类的一个包装。 装饰器模式通过将对象包装在装饰器类中,以便动态…

软考高级系统架构设计师系列论文九十九:论软件开发平台的选择和应用

软考高级系统架构设计师系列论文九十九:论软件开发平台的选择和应用 一、相关知识点二、摘要三、正文四、总结一、相关知识点 软考高级系统架构设计师系列之:面向构件的软件设计,构件平台与典型架构二、摘要 本文从一个行业MIS系统的开发实践,讨论了软件开发平台的选择和应…

java maven项目打jar包发布(精简版)

目录 一、maven打包 二、安装jdk环境 三、安装mysql 四、jar包传输到服务器 一、maven打包 先clean再package target文件夹下面有生成一个jar包 二、安装jdk环境 1、下载jdk cd /usr/local wget https://repo.huaweicloud.com/java/jdk/8u201-b09/jdk-8u201-linux-x64.tar.…

数据库——事务,事务隔离级别

文章目录 什么是事务?事务的特性(ACID)并发事务带来的问题事务隔离级别实际情况演示脏读(读未提交)避免脏读(读已提交)不可重复读可重复读防止幻读(可串行化) 什么是事务? 事务是逻辑上的一组操作,要么都执行,要么都不执行。 事务最经典也经常被拿出…

sonarqube报错http status 500-internal server error,什么原因,怎么解决

sonarqube报错http status 500-internal server error,什么原因,怎么解决 答案: SonarQube报错HTTP状态500-内部服务器错误通常是由于服务器端出现了一些问题导致的。这可能是由于配置错误、资源不足、数据库连接问题或其他一些未知的问题引起的。 以下…

【PHP】基础语法变量常量

文章目录 PHP简介前置知识了解静态网站的特点动态网站特点 PHP基础语法代码标记注释语句分隔(结束)符变量变量的基本概念变量的使用变量命名规则预定义变量可变变量变量传值内存分区 常量基本概念常量定义形式命名规则使用形式系统常量魔术常量 PHP简介 PHP定义:一…

03ShardingSphere-JDBC读写分离

背景 面对日益增加的系统访问量,数据库的吞吐量面临着巨大瓶颈。 对于同一时刻有大量并发读操作和较少写操作类型的应用系统来说,将数据库拆分为主库和从库,主库负责处理事务性的增删改操作,从库负责处理查询操作,能够…

理解 Delphi 的类(四) - 初识类的事件

先勾画一下思路: 1、建立一个类, 里面有年龄字段 FAge; 2、通过 Age 属性读写 FAge; 3、如果输入的年龄刚好是 100 岁, 将会激发一个事件, 这个事件我们给它命名为: OnHundred unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, F…

resource doesn‘t have a corresponding Go package.

resource doesnt have a corresponding Go package. GO这个鬼东西不能直接放src下。 ************ Building Go project: ProjectGoTest ************with GOPATH: D:\Go;D:\eclipse-jee-oxygen-2-win32-x86_64\workspace\ProjectGoTest >> Running: D:\Go\bin\go.exe …

Java | 使用ServerSocket查找TCP可用端口

关注:CodingTechWork 引言 在项目开发中,有一个程序是专门给服务下发tcp端口占用的,但是tcp端口有时候会被其他服务给占用,此时端口就会冲突。本文提供一个工具类进行端口占用判断并返回可用端口。 代码 工具类 Slf4j public …

Open Source Program Office

OSPO 表示 "Open Source Program Office",是指开源项目办公室或开源计划办公室。它是指在组织内部负责管理和支持开源项目的团队或部门。OSPO 的目标是协调、推动和管理组织内部的开源项目,以促进开源文化、社区参与和开源项目的成功。 OSPO …

爱校对发布全新PDF校对工具,为用户带来更为便捷的校正体验

随着数字化文档使用的普及,PDF格式已经成为最为广泛使用的文件格式之一。为满足广大用户对于高效、准确PDF文档校对的需求,爱校对团队经过深入研发,正式推出全新的PDF校对工具! 这一全新工具针对PDF文件格式进行了深度优化&#…

k8s 常用命令(四)

12、删除pod中的nginx服务及service [rootmaster ~]# kubectl delete deployment nginx -n kube-public [rootmaster ~]# kubectl delete svc -n kube-public nginx-service 13、查看endpoint的信息 [rootmaster ~]# kubectl get endpoints 14、修改/更新(镜像、…

机器学习十大算法之七——随机森林

0 引言 集成学习(ensemble learning)是时下非常流行的机器学习算法,它本身不是一个单独的机器学习算法,而是通过在数据上构建多个横型,集成所有模型的建模结果,基本上所有的机器学习领域都可以看到集成学习…

11.redis持久化

1.redis持久化 Redis的所有数据都是保存在内存中,因此redis重启后数据就丢失了,所以需要不定期的通过异步方式保存到磁盘上(这称为“半持久化模式”);或者把每一次数据变化都写入到一个append only file(aof)里面(这称为“全持久化模式”)。 …

Python遥感图像处理应用篇037 GDAL+Scikit-image遥感图像主成分分析PCA

1.计算效果图 使用多波段遥感图像进行主成分分析,这里使用了6个波段的数据计算和显示效果图如下:左边是原图像IR+R+G显示图,右边是计算得到的3个主成分组合显示的RGB图像。 2.计算方法详解 使用GDAL库读取和保存遥感图像,使用numpy对图像数据进行相应的变换和计算,使用…

Fpass与Fstop

在MATLAB中,“Fpass”、“Fstop”、"Apass"和"Astop"是数字滤波器设计中常用的参数。它们用于定义滤波器的频率响应和滤波器的性能。 "Fpass"表示通带频率,指的是滤波器允许通过的频率范围。在数字滤波器设计中&#xff0…