首页 > 系统相关 >centos7 最小化安装yum不能安装软件解决方案

centos7 最小化安装yum不能安装软件解决方案

时间:2024-07-27 11:17:18浏览次数:9  
标签:http centos mirrors com centos7 yum aliyun releasever 安装

慕课网神思者老师课常资料带的布署工具中,自带的liunx 系统centos7 yum发现不能安装软件,比如docker   解决方案

首先我们安装好虚拟机启动系统centos7 尝试安装任何软件都会报仓库错误

 第一反应就是更新yum     yum update   由于仓库不对更新肯定不行了

第二反是   更新仓库   

使用  mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

      wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

     但是发现wget最小化版没有安装,还是得解决仓库问题
  查看仓库 yum pepolist all   会看到好多仓库,可能还有些禁用了

 要想启用某个仓库只需在某个仓库的配置文件将enabled = 0  改为1   就好,但是肯定问题 不在这儿,这些配置老师不会运个东西,

想了一下如果是仓库源有问题  ,我们就将一下正常的仓库内容复制过来,所以我在我们的云主机的文件中复制一个配置过来。

 

修改这个仓库

vi CentOS-Base.repo

# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client.  You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the 
# remarked out baseurl= line instead.
#
#
 
[base]
name=CentOS-$releasever - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/os/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/os/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#released updates 
[updates]
name=CentOS-$releasever - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/updates/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/updates/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/extras/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/extras/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/centosplus/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/centosplus/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/$releasever/contrib/$basearch/
        http://mirrors.aliyuncs.com/centos/$releasever/contrib/$basearch/
        http://mirrors.cloud.aliyuncs.com/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7

我是将里面全删 了,然后粘上这个正确的,然后yum 正常可以更新了。问题解决

 

 

总结一下,配置仓库有问题 我们就拿 一个正确的仓库文件替换一下,因为这个上最小化安装的才有这么多麻烦,如果我们是正确安装有带基础的网络服务的安装,系统就没有这么麻烦

 

标签:http,centos,mirrors,com,centos7,yum,aliyun,releasever,安装
From: https://www.cnblogs.com/ZzwWan/p/18326748

相关文章

  • Stable Diffusion整合包安装教程你值得拥有!!!(附安装包)
    Stabledifusion是一个开源的模型,开源=公开=免费,意味着你可以把这个模型下载到你自己的电脑上或者服务器上面畅玩没有审核人员卡你图片是否有问题,随意出图。01、电脑配置相关知识我们先来看看安装StableDiffusion整合包的需要的电脑配置:电脑配置需求:操作系统:windows......
  • Stable Diffusion(AI绘画)软件安装包下载及安装教程!
    软件介绍StableDiffusion简称(SD)是一款开源的AI绘画软件,基于LatentDiffusionModel(文转图合成技术),能够根据文本描述或图像提示生成生成高质量、高分辨率、高逼真的图像。StableDiffusion由于开源属性,有很多免费高质量的外接预训练模型(fine-tune)和插件。软件:StableDiffu......
  • Linux捣鼓记录:debian12安装xfce桌面环境
    在Debian12上安装Xfce桌面第1步。在安装任何软件包之前,建议更新软件包列表以确保您安装的是最新版本的软件包。您可以通过在终端中运行以下命令来执行此操作:sudoaptupdate&&sudoaptupgrade此命令将刷新存储库,允许您安装最新版本的软件包。第2步。在Debian12......
  • 在python3.8虚拟环境 执行pip 安装Excel的库
    1、在开始菜单打开Anacondaprompt(anaconda3) 2、查看环境列表 3、进入虚拟环境 4、在虚拟换进下使用清华源安装读取excel的库和写入excel的库读取Excel文件的库:pipinstallxlrd-ihttps://pypi.tuna.tsinghua.edu.cn/simple 写入Excel文件的库:pipinstallxlwt......
  • 在 M1 Mac 上安装 pytables 时出现问题
    我正在尝试在M1Mac上安装pytables(使用自制软件安装的MacOS12.6.1、python3.11和hdf51.12.2)。按照https://stackoverflow.com/a/74276925中的建议我执行了以下操作:pipinstallcythonbrewinstallhdf5brewinstallc-bloscexportHDF5_DIR=/opt/homebrew......
  • bzt 运行期间 Windows 11 上的 Chrome 驱动程序安装路径差异
    我在bzt运行期间遇到Chromedriver安装问题。下载zip文件后,系统似乎在以下路径中查找它:15:23:03ERROR:FileNotFoundError:[WinError3]系统找不到指定的路径:'系统找不到指定的路径:'C:\Users\sunimali\.bzt\selenium-taurus\tools\drivers\chromedriver\127.0.......
  • 无法安装 autodock vina(可能是由于 boost)
    作为我正在编写的脚本的一部分,我需要安装autodockvina软件包以实现配体和蛋白质结合。每次我尝试“pipinstallvina”时,都会收到一条错误消息“ValueError:未找到Boost库位置!”。在尝试手动安装boost时,我无法运行bootstrap文件,因为它没有创建在线教程所说的b2文件夹。......
  • Numpy&Pandas:pandas库的安装,不同对象的建立,文件的导入和了解数据
    目录前言一、Pandas库的安装二、不同对象的建立1.Series对象的创建1.用index方法指定索引2.在创建的时候就指定索引3.使用字典的方式创建4.将一个常量与index一起传入创建5.输出值和索引2.DataFrame对象的创建1.不指定列名则以键当列名行索引为默认值2.columns指......
  • ubuntu系统中安装PyQt5,并在Pycharm中配置
    本文详细讲述了在Ubuntu22.04中安装PyQt5的过程,并在Pycharm中导入了两个PyQt5的模块。第一步:打开终端,输入以下指令下载pyqt5:sudoaptinstallpyqt5* 输入“y”继续…第二步:输入以下指令,安装pyqt5相应的工具:并输入“y”继续:sudoaptinstallqttools5-dev-tool......
  • 全网最详细!! Linux 安装、配置教程
    一、下载安装包        首先去官网下载VMware最新版本,以及发行版CentOS-7,懒得下载的可以私信我,我给你发包    其中,CentOS(CommunityEnterpriseOperatingSystem)是一个基于Linux的开源操作系统,它是从RedHatEnterpriseLinux(RHEL)源代码衍生而来的。CentOS......