当前位置: 首页 > news >正文

linux安装git

[root@MiWiFi-RC06-srv rpm-gpg]# yum install git
已加载插件:fastestmirror
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile* base: mirrors.aliyun.com* epel: d2lzkl7pfhq30w.cloudfront.net* extras: mirrors.aliyun.com* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 git.x86_64.0.2.43.0-1.ep7 将被 安装
--> 正在处理依赖关系 git-core = 2.43.0-1.ep7,它被软件包 git-2.43.0-1.ep7.x86_64 需要
--> 正在处理依赖关系 git-core-doc = 2.43.0-1.ep7,它被软件包 git-2.43.0-1.ep7.x86_64 需要
--> 正在处理依赖关系 perl-Git = 2.43.0-1.ep7,它被软件包 git-2.43.0-1.ep7.x86_64 需要
--> 正在处理依赖关系 perl(Term::ReadKey),它被软件包 git-2.43.0-1.ep7.x86_64 需要
--> 正在处理依赖关系 perl(Git),它被软件包 git-2.43.0-1.ep7.x86_64 需要
--> 正在检查事务
---> 软件包 git-core.x86_64.0.2.43.0-1.ep7 将被 安装
--> 正在处理依赖关系 libpcre2-8.so.0()(64bit),它被软件包 git-core-2.43.0-1.ep7.x86_64 需要
---> 软件包 git-core-doc.noarch.0.2.43.0-1.ep7 将被 安装
---> 软件包 perl-Git.noarch.0.2.43.0-1.ep7 将被 安装
--> 正在处理依赖关系 perl(Error),它被软件包 perl-Git-2.43.0-1.ep7.noarch 需要
---> 软件包 perl-TermReadKey.x86_64.0.2.30-20.el7 将被 安装
--> 正在检查事务
---> 软件包 pcre2.x86_64.0.10.23-2.el7 将被 安装
---> 软件包 perl-Error.noarch.1.0.17020-2.el7 将被 安装
--> 解决依赖关系完成依赖关系解决===================================================================================================================================================================================Package                                        架构                                 版本                                             源                                      大小
===================================================================================================================================================================================
正在安装:git                                            x86_64                               2.43.0-1.ep7                                     endpoint                                54 k
为依赖而安装:git-core                                       x86_64                               2.43.0-1.ep7                                     endpoint                                11 Mgit-core-doc                                   noarch                               2.43.0-1.ep7                                     endpoint                               3.0 Mpcre2                                          x86_64                               10.23-2.el7                                      base                                   201 kperl-Error                                     noarch                               1:0.17020-2.el7                                  base                                    32 kperl-Git                                       noarch                               2.43.0-1.ep7                                     endpoint                                41 kperl-TermReadKey                               x86_64                               2.30-20.el7                                      base                                    31 k事务概要
===================================================================================================================================================================================
安装  1 软件包 (+6 依赖软件包)总计:14 M
安装大小:46 M
Is this ok [y/d/N]: y
Downloading packages:
警告:/var/cache/yum/x86_64/7/endpoint/packages/perl-Git-2.43.0-1.ep7.noarch.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID 703df089: NOKEY
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-endpoint-7 检索密钥获取 GPG 密钥失败:[Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-endpoint-7"

报错

Downloading packages:
警告:/var/cache/yum/x86_64/7/endpoint/packages/perl-Git-2.43.0-1.ep7.noarch.rpm: 头V4 RSA/SHA1 Signature, 密钥 ID 703df089: NOKEY
从 file:///etc/pki/rpm-gpg/RPM-GPG-KEY-endpoint-7 检索密钥


获取 GPG 密钥失败:[Errno 14] curl#37 - "Couldn't open file /etc/pki/rpm-gpg/RPM-GPG-KEY-endpoint-7"

解决方法:

方法一:关闭 GPG 校验(不推荐,仅用于测试或临时解决)

sudo yum install perl-Git --nogpgcheck

不推荐用于生产环境,因为关闭 GPG 校验会有安全风险。


方法二:手动导入 GPG 公钥(推荐)
  1. 获取对应的 GPG 公钥

    如果你使用的是某个特定的 CentOS/RHEL/Endpoint 镜像或私有源,请向维护者或官网查找 RPM-GPG-KEY-endpoint-7

  2. 下载并导入密钥

    假设你找到公钥文件,比如:

    wget http://your.repo.domain/path/to/RPM-GPG-KEY-endpoint-7 -O /etc/pki/rpm-gpg/RPM-GPG-KEY-endpoint-7

    然后导入它:

    sudo rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-endpoint-7

  3. 再次执行安装命令

    sudo yum install perl-Git

http://www.dtcms.com/a/200138.html

相关文章:

  • TB开拓者策略交易信号闪烁根因及解决方法
  • 数据分析与应用---数据可视化基础
  • 科普:极简的AI乱战江湖
  • Profinet转Modbus TCP协议转换技术,打通能耗监控‘最后一公里’
  • 大模型(2)——提示工程(Prompt Engineering)
  • 小米MUJIA智能音频眼镜来袭
  • Spring Boot 集成 druid,实现 SQL 监控
  • Serverless 的未来与进阶:持续学习之路
  • Protobuf协议生成和使用
  • JVM频繁FullGC:面试通关“三部曲”心法
  • 「佰傲再生医学」携手企企通,解锁企业采购供应链数字化新体验
  • CSS之网页元素的显示与隐藏(旧土豆网遮罩案例)
  • python:pymysql概念、基本操作和注入问题讲解
  • 2025.5.19总结
  • 深入Java G1 GC调优:如何解决高延迟与吞吐量瓶颈
  • @DS多数据源注解失效
  • 助力DBA技能无缝平迁 | YashanDB携最新成果亮相XCOPS智能运维管理人年会
  • 【回眸】香橙派zero2 嵌入式数据库SQLite
  • Vue3 Element Plus 中el-table-column索引使用问题
  • JVM的内存划分
  • springboot+mybatis或mybatisplus在进行%name%的前后模糊查询时如何放防止sql注入
  • 封装一个基于 WangEditor 的富文本编辑器组件(Vue 3 + TypeScript 实战)
  • 4.【Linux】Linux工具(2)
  • Dolphinscheduler执行工作流失败,后台报duplicate key错误
  • 青岛地铁二号线列车运行图优化系统
  • ROS2简介
  • Spring boot 学习笔记2
  • DAY27
  • Java设计模式之外观模式:从入门到精通(保姆级教程)
  • 【学习笔记】机器学习(Machine Learning) | 第七章|神经网络(2)