• 无法在CentOS7安装docker


    关注 码龄 粉丝数 原力等级 -- 被采纳 被点赞 采纳率 q303651446 2024-07-28 01:43 采纳率: 0% 浏览 15 首页/ 开发工具 / 无法在CentOS7安装docker docker运维容器 问题遇到的现象和发生背景 CENTOS7修改下载镜像地址,安装docker。命令及提示如下:Last login: Sat Jul 27 12:56:30 2024[root@localhost ~]# yum install -y yum-utils device-mapper-persistent-data lvm2已加载插件:fastestmirrorLoading mirror speeds from cached hostfileCould not retrieve mirrorlist http://mirrorlist.centos.org/?release=7&arch=x86_64&repo=extras&infra=stock error was14: curl#6 - "Could not resolve host: mirrorlist.centos.org; 未知的错误" One of the configured repositories failed (未知), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo= ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable or subscription-manager repos --disable= 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=.skip_if_unavailable=true Cannot find a valid baseurl for repo: extras/7/x86_64[root@localhost ~]# sudo yum clean all \ sudo yum makecache已加载插件:fastestmirror错误:清理命令参数不正确:'sudo'简单用法: clean [headers|packages|metadata|dbcache|plugins|expire-cache|all] 删除缓存数据[root@localhost ~]# sudo yum clean all已加载插件:fastestmirror正在清理软件源: base extras updatesCleaning up list of fastest mirrors[root@localhost ~]# sudo yum makecache已加载插件:fastestmirrorDetermining fastest mirrorshttp://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden正在尝试其它镜像。To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. One of the configured repositories failed (CentOS-7 - Base - Aliyun), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=base ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable base or subscription-manager repos --disable=base 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=base.skip_if_unavailable=true failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden[root@localhost ~]# yum install -y yum-utils device-mapper-persistent-data lvm2已加载插件:fastestmirrorLoading mirror speeds from cached hostfilehttp://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden正在尝试其它镜像。To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. One of the configured repositories failed (CentOS-7 - Base - Aliyun), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=base ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable base or subscription-manager repos --disable=base 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=base.skip_if_unavailable=true failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden[root@localhost ~]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.rep-bash: yum-config-manager: 未找到命令[root@localhost ~]# yum install docker-ce已加载插件:fastestmirrorLoading mirror speeds from cached hostfilehttp://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden正在尝试其它镜像。To address this issue please refer to the below wiki article https://wiki.centos.org/yum-errors If above article doesn't help to resolve this issue please use https://bugs.centos.org/. One of the configured repositories failed (CentOS-7 - Base - Aliyun), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this: 1. Contact the upstream for the repository and get them to fix the problem. 2. Reconfigure the baseurl/etc. for the repository, to point to a working upstream. This is most often useful if you are using a newer distribution release than is supported by the repository (and the packages for the previous distribution release still work). 3. Run the command with the repository temporarily disabled yum --disablerepo=base ... 4. Disable the repository permanently, so yum won't use it by default. Yum will then just ignore the repository until you permanently enable it again or use --enablerepo for temporary usage: yum-config-manager --disable base or subscription-manager repos --disable=base 5. Configure the failing repository to be skipped, if it is unavailable. Note that yum will try to contact the repo. when it runs most commands, so will have to try and fail each time (and thus. yum will be be much slower). If it is a very temporary problem though, this is often a nice compromise: yum-config-manager --save --setopt=base.skip_if_unavailable=true failure: repodata/repomd.xml from base: [Errno 256] No more mirrors to try.http://mirrors.aliyun.com/centos/7/os/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 403 - Forbidden[root@localhost ~]# systemctl start dockerFailed to start docker.service: Unit not found.[root@localhost ~]# docker version-bash: docker: 未找到命令[root@localhost ~]# 操作环境、软件版本等信息 VM下安装Centos7, 我想要达到的结果 在CENTOS中安装HomeAssistant 展开全部 收起 写回答 好问题 0 提建议 追加酬金 关注问题 微信扫一扫 点击复制链接 分享 邀请回答 编辑 收藏 删除 结题 收藏 举报 追加酬金 (90%的用户在追加酬金后获得了解决方案) 当前问题酬金 ¥ 0 (可追加 ¥500) ¥ 15¥ 20¥ 50¥ 100¥ 200 支付方式 扫码支付 二维码出错 点击刷新 支付金额 15 元 提供问题酬金的用户不参与问题酬金结算和分配 支付即为同意 《付费问题酬金结算规则》 结题 再想想 删除 再等等

    2条回答 默认 最新

    • 专家-司宇[在线] 2024-07-28 08:40
      关注

      引自免费微信小程序:皆我百晓生

      你的问题涉及到在CentOS 7上安装docker以及Home Assistant。首先,你需要解决你的yum问题,然后才能进一步安装其他应用。根据你给出的信息,似乎是在使用阿里云的镜像时遇到了问题。以下是一些可能的解决方案:

      解决yum问题

      1. 检查网络连接:确保你的服务器可以连接到互联网和阿里云的镜像服务器。
      2. 清除yum缓存:运行命令 sudo yum clean allsudo yum makecache
      3. 更换yum源:可能是当前使用的yum源出现了问题,你可以尝试更换其他的yum源,比如使用官方的CentOS源。

      安装Docker

      在解决了yum问题之后,你可以尝试安装Docker。运行以下命令:

      sudo yum update
      sudo yum install docker-ce
      sudo systemctl start docker
      

      如果你希望docker在系统启动时自动运行,可以运行 sudo systemctl enable docker

      安装Home Assistant

      安装完Docker之后,你可以在Docker中安装Home Assistant。首先,从Docker Hub下载Home Assistant的镜像:

      docker pull homeassistant/home-assistant
      

      然后,运行Home Assistant的容器:

      docker run -d --name=homeassistant -p 8123:8123 -v /your/path/to/config:/config homeassistant/home-assistant
      

      注意替换/your/path/to/config为你的Home Assistant配置文件的路径。默认的端口是8123,你可以根据需要更改。

      希望这些信息对你有所帮助!如果你还有其他问题,欢迎继续提问。

      评论 编辑记录
    • IT工程师_二师兄 2024-07-28 09:26
      关注

      应该可以安装的呀,你把版本告诉我

      评论
    编辑
    预览

    报告相同问题?

  • 相关阅读:
    2022.8.26小结 ABAP 语法记录
    PbootCMS在搭建网站
    上位机与plc写心跳定时扫描连接状态
    数据仓库&数据库
    Python爬虫之Js逆向案例(10)-爬虫数据批量写入mysql数据库
    Jmeter之接口测试基础篇
    【高项】- 进度管理论文
    uniapp 实时定位(系统、后台运行、支持息屏)插件 Ba-Location
    electron 升级 v22 遇到问题
    (八)K8S数据持久化存储
  • 原文地址:https://ask.csdn.net/questions/8133443