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

yum源以及rpm安装包配置、yum源冲突、yum-config-manager命令找不到、curl: (35)、docker镜像重复拉取失败

yum源配置并解决冲突、curl: (35)、docker镜像重复拉取失败、yum-config-manager命令找不到的解决方法

          • 有的时候按照教程走,可能会设置yum源,设置后用yum下载东西很有可能或造成冲突
  • yum源冲突的解决方式无非有两种:
          • 1. 删除冲突软件
          • 2. 更换到以前的 yum 源
          • 这里更推荐 更换到以前的 yum源,删除冲突软件首先要排除(极其浪费时间),然后删除冲突软件(删除之前最好确认这个软件是非必须的,否则可能最后要重装系统了)
  • 一 .[转载] 解决yum多个源冲突的例子
  • 二 .yum安装某个包出现冲突的情况
  • 三 .yum安装源是出现报冲突错误,解决办法
  • 四 .关于自定义yun源遇到的冲突问题(随手记)
  • 五 .Depsolving loop limit reached
  • 六 .解决Centos下的软件源冲突的问题,包括提示发现rpm问题,"depsolving loop limit reached"等问题。
      • 1.package-cleanup --cleandupes命令
      • 2.rpm -e $(rpm -q --qf="%{NAME}.%{BUILDTIME} %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n" $(package-cleanup --dupes -q) | sort | awk 'NR%2 != 0 { print $2 }')
      • 3.yum repolist
          • -------------------------------------------以上是我查找到的一类方法,也欢迎各位指正,并在评论补充各自的解决这类问题的方法。如有帮助,十分荣幸!!
  • 七 .成功解决:curl: (35) TCP connection reset by peer
  • 八 .yum-config-manager命令找不到的解决方法
  • 九 .配置yum源,rpm安装包地址
      • 推荐两个比较有名的rpm安装包地址
      • 配置yum源
  • 十 .docker 无法正常pull镜像
      • 解决方法
          • 1. 通过命令查询可用的解析IP
          • 2. 修改hosts记录文件
          • 3. docker pull centos
  • 十一 .docker镜像重复拉取失败等相关问题

有的时候按照教程走,可能会设置yum源,设置后用yum下载东西很有可能或造成冲突

yum源冲突的解决方式无非有两种:

1. 删除冲突软件
2. 更换到以前的 yum 源
这里更推荐 更换到以前的 yum源,删除冲突软件首先要排除(极其浪费时间),然后删除冲突软件(删除之前最好确认这个软件是非必须的,否则可能最后要重装系统了)

一 .[转载] 解决yum多个源冲突的例子

原文:http://ubuntu.chapinware.com/2010/01/08/install-vlc-on-centos-5-4-libdvdread-so-3-libcucul-missing/

==================================================

I wanted to use vlc as client for multimedia files, but ran into some dependency errors with libraries libdvdread.so.3 and libcucul.so.0 .
Installation was initially started by

yum install vlc

but finished with errors, described above.

I wondered why the installation cannot find the libraries, since they are installed .

ll /usr/lib | grep libdvd*
ll /usr/lib | grep libcu*

showed me both libraries. I tried to manually set a symbolic link for libdvdread.so.3 (since there only was a link for xxx.so.4), but with no success.

The solution of this problem was to resolve the mixture of libraries installed from different repositories.
In this case the libdvdread from epel and rpmforge caused the confusion. You can check this (if both repositories are enabled) by

yum provides libdvdread

Both repositories offer a libdvdread, but completely different.
Therefore I performed the following steps to get a working vlc installation.

deinstall current libdvdread and libcucul

yum erase libdvdread
yum erase libcaca

cleanup yum

yum clean all

install vlc and dependencies from rpmforge

yum --disablerepo /* --enablerepo base,updates,rpmforge install vlc
finished….installed 25 packages.

Check again which repository provided the libdvdread, just to be sure 😉

yum list libdvdread

prints the following output (on my box)


Installed Packages
libdvdread.i386 0.9.7-1.el5.rf installed
Available Packages
libdvdread.i386 4.1.3-1.el5 epel

Besides this, it is a preferable method to use priorities in your yum repositorities in /etc/yum.repos.d/*.repo files to avoid a confusion about different versions of files installed from different repositories.
Details about yum and priorities here

二 .yum安装某个包出现冲突的情况

yum安装是非常方便的,可以自动解决依赖问题,但是有时候我们安装包会出现冲突,这个时候我们就要查找是哪些包与哪些包出现冲突,然后再针对性的解决问题。

一般来说起冲突的包会报出来,主要为两点

1、包与包之间要仔细查看谁冲突了谁,然后依次查找这两个包是否在系统中安装过,rpm -a命令来查看。最后把已安装过的包卸载了(前提是包不重要)再看看会不会冲突。

这个可以参考链接:http://blog.51cto.com/11009243/1835644
此参考链接即 三 .yum安装某个包出现冲突的情况

2、冲突的包也有报出版本引起的问题,这个我们需要解决版本之间过高过低的包。

比如我今天要安装libc开头的包,那么我的命令就是yum install libc*。以libc开头的包有很多,因此包与包之间起了冲突,导致安装失败,详细的报错结果是:

在这里插入图片描述

经过排查发现libcmpiCppImpl0包与tog-pegasus-libs包起冲突,我发现上面的准备安装包的这个过程时候,首先是准备安装tog-pegasus-libs包,然后再准备安装libcmpiCppImpl0包,(注意本地这两个包我都没有安装),然而两个包之间起冲突,也就是只能安装其中的一个,经过测试,tog-pegasus-libs包是必须要安装的,那么我只能排除tog-pegasus-libs包的安装。下面是我安装的命令:

在这里插入图片描述

那我只能排除这个包了。最后就安装成功了。

当然有的人必须需要安装libcmpiCppImpl0包,那么可以参照这个链接的结果过程:

http://blog.51cto.com/11009243/1835644。
此参考链接即 三 .yum安装某个包出现冲突的情况

看完之后你会发现,其实他就是把tog-pegasus-libs包给卸载了,然后就安装成功libcmpiCppImpl0包了。

最后再补充的就是:

1、rpm -qa查看系统是否安装某个rpm包

2、yum list 显示一个包是否可以安装,是从镜像源中去查找这个包。

三 .yum安装源是出现报冲突错误,解决办法

起因,是打算在linux6.5服务器上安装 dell的osma 管理工具

在安装先决包时出现错误

报错如下:

yum install libcmpiCppImpl0
已加载插件:aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for kernel ABI
设置安装进程
解决依赖关系
--> 执行事务检查
---> Package libcmpiCppImpl0.x86_64 0:2.0.1-5.el6 will be 安装
--> 处理 libcmpiCppImpl0-2.0.1-5.el6.x86_64 与 tog-pegasus 的冲突
--> 完成依赖关系计算
错误:libcmpiCppImpl0 conflicts with 2:tog-pegasus-2.12.0-3.0.1.el6_4.x86_64You could try using --skip-broken to work around the problemYou could try running: rpm -Va --nofiles --nodigest

==============================

不要轻易尝试 --skip-brokenrpm -Va --nofiles 跳过错误很可能会导致重启机器系统起不来

我的解决办法:

1,根据网上说的办法,把第三方的yum源先移除掉

然后更新yum 缓存 但是没效果

2,根据冲突原因:

yum list tog-pegasus

查看安装的tog-pegasus版本,然后在用 yum erase tog-pegasus 把对应的版本卸载掉

前提是依赖的包不重要

最后我再次

yum install libcmpiCppImpl0
已加载插件:aliases, changelog, downloadonly, kabi, presto, refresh-packagekit, security, tmprepo, verify, versionlock
Loading support for kernel ABI
设置安装进程
解决依赖关系
--> 执行事务检查
---> Package libcmpiCppImpl0.x86_64 0:2.0.1-5.el6 will be 安装
--> 完成依赖关系计算依赖关系解决=======================================================================================================================================================================软件包                                        架构                                 版本                                       仓库                               大小
=======================================================================================================================================================================
正在安装:libcmpiCppImpl0                               x86_64                               2.0.1-5.el6                                dvd                                71 k事务概要
=======================================================================================================================================================================
Install       1 Package(s)总下载量:71 k
Installed size: 247 k
确定吗?[y/N]:y成功了!

四 .关于自定义yun源遇到的冲突问题(随手记)

Error: Package: glibc-devel-2.17-317.el7.x86_64 (c7-media)Requires: glibc-headers = 2.17-317.el7Installing: glibc-headers-2.17-260.el7.x86_64 (c7-media)glibc-headers = 2.17-260.el7
Error: Package: glibc-devel-2.17-317.el7.x86_64 (c7-media)Requires: glibc-headers = 2.17-317.el7Available: glibc-headers-2.17-260.el7.x86_64 (c7-media)glibc-headers = 2.17-260.el7
Error: Package: glibc-devel-2.17-317.el7.x86_64 (c7-media)Requires: glibc = 2.17-317.el7Installed: glibc-2.17-260.el7.x86_64 (@anaconda)glibc = 2.17-260.el7You could try using --skip-broken to work around the problemYou could try running: rpm -Va --nofiles --nodigest

本地yum源安装包冲突了,删除掉自定义yum源中glibc-devel-2.17-317.el7.x86_64.rpm包后重新createrepo 目录即可

五 .Depsolving loop limit reached

最近用centos6,遇见一个yum源的问题,刚开始yum安装老是报:

   Depsolving loop limit reached

后面还跟了一堆错误:

 错误:Package: xorg-x11-drv-sis-0.10.8-1.el6.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)Requires: xserver-abi(videodrv-19) >= 0正在删除: xorg-x11-server-Xorg-1.17.4-9.el6.centos.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)xserver-abi(videodrv-19) = 0Updated By: xorg-x11-server-Xorg-1.20.4-15.el7_9.x86_64 (updates)Not found
错误:Package: xorg-x11-drv-acecad-1.5.0-8.el6.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)Requires: xserver-abi(xinput-21) >= 0正在删除: xorg-x11-server-Xorg-1.17.4-9.el6.centos.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)xserver-abi(xinput-21) = 0Updated By: xorg-x11-server-Xorg-1.20.4-15.el7_9.x86_64 (updates)Not found
错误:Package: ibus-anthy-1.2.1-3.el6.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)Requires: python(abi) = 2.6正在删除: python-2.6.6-64.el6.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)python(abi) = 2.6Updated By: python-2.7.5-90.el7.x86_64 (updates)python(abi) = 2.7python(abi) = 2.7Available: python-2.7.5-89.el7.x86_64 (base)python(abi) = 2.7python(abi) = 2.7Available: python3-3.6.8-17.el7.i686 (base)python(abi) = 3.6python(abi) = 3.6Available: python3-3.6.8-18.el7.i686 (updates)python(abi) = 3.6python(abi) = 3.6Available: python34-3.4.10-4.el6.i686 (epel)python(abi) = 3.4
错误:Package: pygtksourceview-2.8.0-1.el6.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)Requires: python(abi) = 2.6正在删除: python-2.6.6-64.el6.x86_64 (@anaconda-CentOS-201605220104.x86_64/6.8)python(abi) = 2.6

知道是yum源的问题,但是找了很长时间都没有找到一个能用的,再极度不服的心理状态下终于有了回报:get到一个yum源,分享一下,希望对有需要得人有用

如下设置:
在这里插入图片描述

六 .解决Centos下的软件源冲突的问题,包括提示发现rpm问题,"depsolving loop limit reached"等问题。

1.package-cleanup --cleandupes命令

在命令行界面输入该命令,某种程度上可以解决这类问题,但貌似有一点限制,其实会发现大部分问题无法解决。经常是提示说"depsolving loop limit reached"问题,下面一堆"xxx 是 xxx 的 副本",总之看的你头疼,成功了就庆祝一下吧。

2.rpm -e $(rpm -q --qf=“%{NAME}.%{BUILDTIME} %{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}\n” $(package-cleanup --dupes -q) | sort | awk ‘NR%2 != 0 { print $2 }’)

这个命令行说实在的,挺复杂的,我也没怎么去分析,有兴趣的可以看下,不过他解决了我的这类问题,有类似问题的可以试一下,是从一个国外论坛里找到的,大神果然还是民间的多啊。

3.yum repolist

这个是查询你repo库,你看下是否是有下载了冲突的repo库,例如rhel6,你又搞了rhel7,你说能不冲突,把冲突的repo库删除,某种程度上也是可以解决你的问题。

-------------------------------------------以上是我查找到的一类方法,也欢迎各位指正,并在评论补充各自的解决这类问题的方法。如有帮助,十分荣幸!!

七 .成功解决:curl: (35) TCP connection reset by peer

成功解决:curl: (35) TCP connection reset by peer报错

当我在centOS7安装Docker-compose执行以下命令时:

curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

出现报错:

curl: (35) TCP connection reset by peer

具体截图如下所示:

在这里插入图片描述

解决方法:

多次执行指令(如果几次不行,新建一个终端多执行多次就可以了)

curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

成功解决问题,指令执行成功,已在下载状态:

在这里插入图片描述

下载成功
在这里插入图片描述

欢迎各位小伙伴讨论,如有问题请在评论区评论或发私聊消息,欢迎各位的留言!

八 .yum-config-manager命令找不到的解决方法

yum-config-manager: command not found

这个是因为系统默认没有安装这个命令,这个命令在yum-utils 包里,可以通过命令

yum -y install yum-utils

安装就可以了。

九 .配置yum源,rpm安装包地址

推荐两个比较有名的rpm安装包地址

http://mirrors.163.com/centos/7/os/x86_64/Packages/ 网易

https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/ 阿里云

配置yum源

yum源j简单理解为手机的应用商城,专门下载各类工具,软件的地方,自己的系统配置好yum源以后下载,更新软件很方便

rpm包安装也是一种方式,但要手动解决依赖,就好比你想吃饺子,但是你要自己先弄饺子皮和馅儿你才能吃饺子;

yum源安装就相当于你去饭店吃饺子,饺子皮和馅儿不用你动手,你只管吃饺子

yum源安装路径:/etc/yum.repos.d

#rpm -qa yum    查出系统现有的Yum源
# rpm -qa|grep yum|xargs rpm -e --nodeps     删除现有yum包  /etc/yum.repos.d这个目录也会被删除

https://mirrors.aliyun.com/centos/7/os/x86_64/Packages/ 进到此URL下载一下rpm包至同一目录(我的下载到/home/HK/rpm)

下面的这些包版本号是一直在更新的,所以搜索的时候只要前面的英文字符就行了

python-chardet-.noarch.rpm
python-kitchen-.noarch.rpm
python-urlgrabber-.noarch.rpm
rpm-4.11.x86_64.rpm
rpm-build-libs-4.11.3-35.el7.x86_64.rpm
rpm-libs-4.11.3-35.el7.x86_64.rpm
rpm-python-4.11.3-35.el7.x86_64.rpm
wget-1.14-18.el7.x86_64.rpm
yum-3.4.3-161.el7.centos.noarch.rpm
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm
yum-updateonboot-1.1.31-50.el7.noarch.rpm
yum-utils-1.1.31-50.el7.noarch.rpm
cd /home/HK/rpm
#rpm -ivh *.rpm --force --nodeps    强制安装这几个包忽略依赖
#mkdir /etc/yum.repos.d
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

#vi /etc/yum.repos.d/CentOS-Base.repo 进入命令行输入%s/ r e l e a s e / 7 / g 将里面的 release/7/g 将里面的 release/7/g将里面的release(大概是这个,很好认,自己找一下,大概是有20个$release)换成7(自己的系统版本)

#yum clean all
#yum makecache    生成元数据
#yum -y install gcc*      安装测试
#yum -y install lrzsz     安装上传下载工具   rz上传    sz下载

十 .docker 无法正常pull镜像

Using default tag: latest
Trying to pull repository docker.io/library/centos …
Get  https://registry-1.docker.io/v2/library/centos/manifests/latest: net/http: TLS handshake timeout

解决方法

1. 通过命令查询可用的解析IP
 dig @114.114.114.114 registry-1.docker.io

工具需要安装一个命令dig

 yum install bind-utils   

其它版本安装方式:
在Gentoo下是bind-tools,在Redhat/Fedora下是 bind-utils,或者在 Debian下是 dnsutils。

[root@tomcat8 ~]# dig @114.114.114.114 registry-1.docker.io; <<>> DiG 9.9.4-RedHat-9.9.4-72.el7 <<>> @114.114.114.114 registry-1.docker.io
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58485
;; flags: qr rd ra; QUERY: 1, ANSWER: 8, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;registry-1.docker.io. IN A;; ANSWER SECTION:
registry-1.docker.io. 30 IN A 34.205.207.96
registry-1.docker.io. 30 IN A 34.201.236.93
registry-1.docker.io. 30 IN A 54.175.43.85
registry-1.docker.io. 30 IN A 34.200.28.105
registry-1.docker.io. 30 IN A 52.70.175.131
registry-1.docker.io. 30 IN A 52.54.155.177
registry-1.docker.io. 30 IN A 34.206.236.31
registry-1.docker.io. 30 IN A 54.165.149.19
2. 修改hosts记录文件
vi /etc/hosts
52.54.155.177   registry-1.docker.io
3. docker pull centos
 [root@tomcat8 ~]# docker pull centosUsing default tag: latestTrying to pull repository docker.io/library/centos ... latest: Pulling from docker.io/library/centosa02a4930cb5d: Downloading [=======>                                           ]  11.8 MB/75.17 MB

十一 .docker镜像重复拉取失败等相关问题

docker镜像重复拉取失败问题:

如,docker pull tomcat:

1.Using default tag: latest
Trying to pull repository docker.io/library/tomcat …
Get https://registry-1.docker.io/v2/library/tomcat/manifests/latest: Get https://auth.docker.io/token?scope=repository%3Alibrary%2Ftomcat%3Apull&service=registry.docker.io: read tcp 192.168.31.85:54742->18.214.230.110:443: read: connection reset by peer2.Using default tag: latest
Trying to pull repository docker.io/library/tomcat …
Get https://registry-1.docker.io/v2/: read tcp 192.168.31.85:47046->34.238.187.50:443: read: connection reset by peer

等。。。

解决方案,一步到位
修改docker镜像获取源文件daemon.json,即

vim /etc/docker/daemon.json

清除原内容,copy以下:

{"registry-mirrors": ["http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn","https://registry.docker-cn.com","http://hub-mirror.c.163.com","https://docker.mirrors.ustc.edu.cn","https://docker.mirrors.ustc.edu.cn"]
}
#网易,中科大,国网多个源地址

修改成功后重启docker

systemctl restart docker

完毕!
后续自行pull镜像~








DLite

[转载] 解决yum多个源冲突的例子

zhengminghao

yum安装源是出现报冲突错误,解决办法

我是一只蘑菇17

yum安装某个包出现冲突的情况

Jia_pw

关于自定义yun源遇到的冲突问题(随手记)

yibo_java

Depsolving loop limit reached

HSINCSU

解决Centos下的软件源冲突的问题,包括提示发现rpm问题,"depsolving loop limit reached"等问题。

星川皆无恙

成功解决:curl: (35) TCP connection reset by peer

m0_74360037

yum-config-manager命令找不到的解决方法

cainiaoke

配置yum源,rpm安装包地址

小小子之家

docker 无法正常pull镜像

Tester_Karl

docker镜像重复拉取失败等相关问题

http://www.lryc.cn/news/148707.html

相关文章:

  • ChatGPT和文心一言的优缺点比较
  • ⛳ 面试题-单例模式会存在线程安全问题吗?
  • C - 滑动窗口 /【模板】单调队列
  • 工厂人员作业行为动作识别检测算法
  • 【数据结构】顺序表详解
  • HTML 播放器效果
  • C++常用23种设计模式总结(三)------装饰模式
  • 选择O型圈时要考虑哪些因素?
  • 安全管理中心技术测评要求项
  • Hibernate(Spring Data)抓取策略
  • 【高阶数据结构】map和set的介绍和使用 {关联式容器;键值对;map和set;multimap和multiset;OJ练习}
  • 系统架构技能之设计模式-单件模式
  • Redis进阶 - JVM进程缓存
  • SD-WAN带您告别高成本、单一功能和安全性差
  • 面试必备:揭秘ArrayList和LinkedList,区别、优缺点与使用场景
  • 【局部活动轮廓】使用水平集方法实现局部活动轮廓方法研究(Matlab代码实现)
  • Git 同步远程新的同名分支
  • PingCode DevOps 团队:企业CICD流水线可能会遇到的问题及解法
  • 【LeetCode题目详解】第九章 动态规划part01 509. 斐波那契数 70. 爬楼梯 746. 使用最小花费爬楼梯 (day38补)
  • 图像处理 信号处理板 设计原理图:367-基于zynq XC7Z100 FMC接口通用计算平台
  • PHP中header()的七种用法
  • 臻图信息以数字孪生技术推动智慧小区数字化建设
  • 15.CSS发光按钮的悬停特效
  • MyBatis —— 动态SQL和缓存
  • 恒流电路的三种设计方案
  • QT基础 关于QT延迟
  • LLM - LLaMA-2 获取文本向量并计算 Cos 相似度
  • 【创建型设计模式】C#设计模式之工厂模式,以及通过反射实现动态工厂。
  • 可拖拽编辑的流程图X6
  • 神经网络与卷积神经网络