首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何处理‘`yum repolist is 0’和‘`yum list空’?

如何处理‘`yum repolist is 0’和‘`yum list空’?
EN

Unix & Linux用户
提问于 2019-11-30 19:48:09
回答 1查看 3.4K关注 0票数 1

我在centos 7主机上运行了一个码头映像(gitlab-runner)。在容器中,奇怪的是它有apt命令,但是没有yum command.But系统似乎是一个中心而不是ubuntu?

代码语言:javascript
复制
root@vultr:/usr/local/java# uname -r 
3.10.0-1062.4.1.el7.x86_64

我用apt-get install来安装yum,然后我想做yum更新,但是我遇到了以下问题,如何处理?

代码语言:javascript
复制
    root@vultr:/usr/local/java# yum update      
    There are no enabled repos.
    Run "yum repolist all" to see the repos you have.
    You can enable repos with yum-config-manager --enable <repo>
    root@vultr:/usr/local/java# yum repolist all
    repolist: 0
    root@vultr:/usr/local/java# yum list
    root@vultr:/usr/local/java#
    root@vultr:/usr/local/java#
    root@vultr:/usr/local/java# yum-config-manager --enable
    Error: Trying to enable already enabled repos.
    ==================================================================================================== main ====================================================================================================
    [main]
    alwaysprompt = True
    assumeyes = False
    bandwidth = 0
    bugtracker_url = http://yum.baseurl.org/report
    cache = 0
    cachedir = /var/cache/yum
    clean_requirements_on_remove = False
    color = auto
    color_list_available_downgrade = dim,cyan
    color_list_available_install = normal
    color_list_available_reinstall = bold,underline,green
    color_list_available_upgrade = bold,blue
    color_list_installed_extra = bold,red
    color_list_installed_newer = bold,yellow
    color_list_installed_older = bold
    color_list_installed_reinstall = normal
    color_search_match = bold
    color_update_installed = normal
    color_update_local = bold
    color_update_remote = normal
    commands =
    debuglevel = 2
    diskspacecheck = True
    distroverpkg = redhat-release
    enable_group_conditionals = True
    enabled = True
    enablegroups = True
    errorlevel = 2
    exactarch = True
    exactarchlist = kernel,
       kernel-smp,
       kernel-hugemem,
       kernel-enterprise,
       kernel-bigmem,
       kernel-devel,
       kernel-PAE,
       kernel-PAE-debug
    exclude =
    exit_on_lock = False
    failovermethod = roundrobin
    gaftonmode = False
    gpgcheck = False
    group_package_types = mandatory,
       default
    groupremove_leaf_only = False
    history_list_view = single-user-commands
EN

回答 1

Unix & Linux用户

回答已采纳

发布于 2019-12-01 07:23:01

GitLab运行程序映像是基于Ubuntu或Alpine的。这是在医生里声明的:

可获得下列Docker图像:

  • 基于Ubuntu的gitlab/gitlab-runner:latest
  • gitlab/gitlab-runner:alpine基于阿尔卑斯山,占地面积小得多(~160/350MB Ubuntu ~45/130MB阿尔卑斯压缩/解压)。

Ubuntu和Alpine都有自己的包管理系统-- aptapk。可以使用这些包管理器在容器中添加/删除包。yum是RHEL/Fedora类Linux发行版的包管理器,Ubuntu或Alpine都不使用它。

票数 4
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/554976

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档