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-dev
  libboost-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-dev
  libboost-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-dev
  libboost-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-dev
  libboost-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-dev
  libboost-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-dev
  libboost-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-dev
  libboost-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.0
  libboost-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-dev
  libboost-stacktrace1.71.0 libboost-system-dev libboost-system1.71-dev libboost-system1.71.0 libboost


Get: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  InRelease
  The 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 installed
 libopencv-dev : Depends: libopencv-calib3d-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-contrib-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-features2d-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-highgui-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-objdetect-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-stitching-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-superres-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-videoio-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-videostab-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-viz-dev (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv3.2-java (= 3.2.0+dfsg-4ubuntu0.1) but it is not going to be installed
                 Depends: libopencv-calib3d3.2 but it is not going to be installed
                 Depends: libopencv-contrib3.2 but it is not going to be installed
                 Depends: libopencv-features2d3.2 but it is not going to be installed
                 Depends: libopencv-highgui3.2 but it is not going to be installed
                 Depends: 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 partner

deb 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!!

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

拼多多开放平台的API接口可以获取拼多多电商数据。以下是API接口流程

使用拼多多开放平台的API接口可以获取拼多多电商数据。以下是一般的API接口流程: 1. 注册开发者账号:首先,您需要在拼多多开放平台注册一个开发者账号。通过开发者账号,您可以获得API密钥和其他必要的信息。 2. 鉴权与认证&…

查看windows当前占用的所有端口、根据ipt终止任务进程、OS、operatingSystem

文章目录 查询端口查询指定端口根据进程pid查询进程名称查看所有进程名称根据pid终止任务进程根据进程名称终止任务 查询端口 netstat -ano查询指定端口 netstat -ano | findstr "80"根据进程pid查询进程名称 tasklist | findstr "660"查看所有进程名称 ta…

Flutter Cannot run with sound null safety, because the following dependencies

flutter sdk 版本升级到2.0或者更高的版本后,运行之前的代码会报错 Error: Cannot run with sound null safety, because the following dependencies dont support null safety:- package:flutter_swiper- package:flutter_page_indicator- package:transformer_p…

python 面试题--3(15题)

目录 Python中的生成器是什么?如何创建一个生成器? 解释Python中的递归函数及其使用场景。 Python中的迭代器和可迭代对象有什么区别? 什么是Python中的模块和包?它们有什么区别? 如何在Python中处理异常&#xf…

MySQL数据库中间件Mycat介绍及下载安装(教程)

一,介绍 MyCat是开源的、活跃的、基于Java语言编写的MySQL数据库中间件。可以像使用MySQL一样来使用MyCat,对于开发人员来说根本感觉不到MyCat的存在。 开发人员只需要连接MyCat即可,而具体底层用到几台数据库,每一台数据库服务器…

有序充电运营管理平台是基于物联网和大数据技术的充电设施管理系统-安科瑞黄安南

随着我国能源战略发展以及低碳行动的实施,电动汽车已逐步广泛应用,而电动汽车的应用非常符合当今社会对环保意识的要求,以及有效节省化石燃料的消耗。 由于其没有污染排放的优点以及政府部门的关注,电动汽车将成为以后出行的重要…

JAVA坦克大战游戏v3

JAVA坦克大战游戏v3 素材 bomb_3.gif bomb_2.gif bomb_1.gif 项目结构 游戏演示 MyTankGame3.java /*** 功能:坦克游戏的5.0[]* 1.画出坦克.* 2.我的坦克可以上下左右移动* 3.可以发射子弹,子弹连发(最多5)* 4.当我的坦克击中敌人坦克时,敌人就消失(爆炸的效…

第一个VUE程序?

<!DOCTYPE html> <html lang"en"> <head><meta charset"UTF-8"><title>Title</title></head> <body><div id"app">{{message}} </div><!-- 1.导入Vue.js --> <script s…

【python】python智能停车场数据分析(代码+数据集)【独一无二】

&#x1f449;博__主&#x1f448;&#xff1a;米码收割机 &#x1f449;技__能&#x1f448;&#xff1a;C/Python语言 &#x1f449;公众号&#x1f448;&#xff1a;测试开发自动化【获取源码商业合作】 &#x1f449;荣__誉&#x1f448;&#xff1a;阿里云博客专家博主、5…

ElasticSearch(一)数据类型

ElasticSearch&#xff08;一&#xff09;数据类型 1.简述 Es数据类型分为基础数据类型和复杂类型数据&#xff0c;掌握ES数据类型才能进一步使用ES检索数据内容。 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot…

linux操作系统的权限的深入学习(未完)

1.Linux权限的概念 Linux下有两种用户&#xff1a;超级用户&#xff08;root&#xff09;、普通用户。 超级用户&#xff1a;可以再linux系统下做任何事情&#xff0c;不受限制 普通用户&#xff1a;在linux下做有限的事情。 超级用户的命令提示符是“#”&#xff0c;普通用户…

基于Java+SpringBoot+Vue前后端分离体育馆管理系统设计和实现

博主介绍&#xff1a;✌全网粉丝30W,csdn特邀作者、博客专家、CSDN新星计划导师、Java领域优质创作者,博客之星、掘金/华为云/阿里云/InfoQ等平台优质作者、专注于Java技术领域和毕业项目实战✌ &#x1f345;文末获取源码联系&#x1f345; &#x1f447;&#x1f3fb; 精彩专…

SOA通信中间件常用的通信协议

摘要&#xff1a; SOA&#xff08;面向服务的架构&#xff09;的软件设计原则之一是模块化。 前言 SOA&#xff08;面向服务的架构&#xff09;的软件设计原则之一是模块化。模块化可以提高软件系统的可维护性和代码重用性&#xff0c;并且能够隔离故障。举例来说&#xff0c;…

Unity3D Pico VR 手势识别

本文章使用的 Unity3D版本: 2021.3.6 , Pico SDK 230 ,Pico OS v.5.7.1 硬件Pico 4 Pico SDK可以去Pico官网下载SDK 导入SDK 第一步&#xff1a;创建Unity3D项目 第二步&#xff1a;导入 PICO Unity Integration SDK 选择 Windows > Package Manager。 在 Packag…

(笔记二)利用opencv调用鼠标事件在图像上绘制图形

目录 &#xff08;1&#xff09;查看cv2所支持的鼠标事件&#xff08;2&#xff09;通过鼠标事件在图像上做标记&#xff08;3&#xff09;高级操作&#xff1a;通过移动鼠标在图像绘制图形、曲线 该功能主要创建一个鼠标事件发生时执行的回调函数。鼠标事件可以是任何与鼠标有…

快速安装Qt开发环境,克服在线安装慢等问题

自从Qt6之后&#xff0c;QtCreater的安装都需要注册账号&#xff0c;并且使用账号在线安装&#xff0c;继续使用官网的资源站下载的话&#xff0c;会特别的慢&#xff0c;以下是提高在线安装速度的做法。 官网下载很慢&#xff0c;快速安装的方式如下 1、winR,输入CMD&#xff…

系统集成项目管理工程师【中级】考证学习资料知识点整理分享——第二章《信息系统集成及服务管理》,持续更新中........

系统集成项目管理工程师(中级)考证学习资料整理分享,持续更新中........ 目 录 第二章《信息系统集成及服务管理》 一、信息系统集成及服务管理 (一)信息系统集成及服务管理的内容 (二)信息系统集成及服务管理的推进 1.实施信息系统集成及服务资质管理制度 1)…

ElasticSearch常用方法

ElasticSearch:是一个储存、检索、数据分析引擎。 在互联网项目中我们经常会按一定的条件去索引我们指定的数据&#xff0c;但是在大量的数据中我们如果直接查询数据库效率是非常低的&#xff0c;ElasticSearch就可以很好的帮我们完成检索。 es封装了api提供给我我们直接操作…

C++构造函数初始化列表

构造函数的一项重要功能是对成员变量进行初始化&#xff0c;为了达到这个目的&#xff0c;可以在构造函数的函数体中对成员变量一一赋值&#xff0c;还可以采用初始化列表。 C构造函数的初始化列表使得代码更加简洁&#xff0c;请看下面的例子&#xff1a; #include <iostre…