本文最后更新于652 天前,其中的信息可能已经过时,如有错误请发送邮件到takumijie@qq.com
问题
这个问题是最近在使用Centos部署完新项目时发现的,具体造成的原因未知如果说有大佬知道可以评论区告诉我。
error:unpacking of archive failed on file /usr/bin/telnet;5e785bc7:cpio:open
类似于此种报错,最开始我以为只是单纯的yum源的问题,在修改了源之后我发现并不能正常使用,所以我选择了最简单的重装。
解决方法
第一步:卸载掉yum和python
rpm -qa |grep python ##查看python包
rpm -qa|grep python|xargs rpm -ev --allmatches --nodeps ##强制卸载python及其相关包
whereis python|xargs rm -frv ##删除残留文件
rpm -qa|grep yum|xargs rpm -ev --allmatches --nodeps ##强制卸载yum及其相关包
rm -rf /etc/yum.repos.d/* ##删除yum文件
whereis yum|xargs rm -frv ##删除残留文件
注意:这种卸载方式会很干净注意管理好自己的文件
第二步:下载python以及yum的安装包。
这里仅提供下载链接和需要下载的包名
云盘下载(可能失效):https://cloud.ilibilib.top/%E9%98%BF%E9%87%8C%E4%BA%91%E7%9B%98/web/yum
python-2.7.5-89.el7.x86_64.rpm
python-chardet-2.2.1-3.el7.noarch.rpm
python-devel-2.7.5-89.el7.x86_64.rpm
python-iniparse-0.4-9.el7.noarch.rpm
python-kitchen-1.1.1-5.el7.noarch.rpm
python-libs-2.7.5-89.el7.x86_64.rpm
python-pycurl-7.19.0-19.el7.x86_64.rpm
python-setuptools-0.9.8-7.el7.noarch.rpm
python-urlgrabber-3.10-10.el7.noarch.rpm
rpm-python-4.11.3-45.el7.x86_64.rpm
yum-3.4.3-168.el7.centos.noarch.rpm
yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
yum-plugin-aliases-1.1.31-54.el7_8.noarch.rpm
yum-plugin-fastestmirror-1.1.31-54.el7_8.noarch.rpm
yum-plugin-protectbase-1.1.31-54.el7_8.noarch.rpm
yum-updateonboot-1.1.31-54.el7_8.noarch.rpm
yum-utils-1.1.31-54.el7_8.noarch.rpm
第三步:安装python和yum。
可以将所有的包放到一个文件夹然后再执行
rpm -ivh --force *.rpm --nodeps ##强制安装不管依赖
yum makecache ##再输入这个指令查看是否正常
若出现下列报错则是yum源出错。
已加载插件:aliases, fastestmirror, protectbase
Loading mirror speeds from cached hostfile
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
To enable Red Hat Subscription Management repositories:
subscription-manager repos --enable
To enable custom repositories:
yum-config-manager --enable
我们可以删除原来的yum源再重新下载yum源这里示例一下阿里云的源。
rm -f /etc/yum.repos.d/CentOS-Base.repo ##删除原来的yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo ##重新下载阿里云的源
yum clean all ##清理缓存 注:(有很多问题可能都是缓存导致的)
再次验证
yum makecache ##验证
* base: mirrors.cloud.aliyuncs.com
* extras: mirrors.cloud.aliyuncs.com
* updates: mirrors.cloud.aliyuncs.com
base | 3.6 kB 00:00:00
extras | 2.9 kB 00:00:00
updates | 2.9 kB 00:00:00
(1/6): extras/7/x86_64/filelists_db | 276 kB 00:00:00
(2/6): extras/7/x86_64/other_db | 149 kB 00:00:00
(3/6): updates/7/x86_64/other_db | 1.3 MB 00:00:00
(4/6): base/7/x86_64/other_db | 2.6 MB 00:00:00
(5/6): base/7/x86_64/filelists_db | 7.2 MB 00:00:00
(6/6): updates/7/x86_64/filelists_db | 11 MB 00:00:00
元数据缓存已建立
##如果出现上方的输出即使成功安装并配置建议再更新一下源
yum update ##更新
结束
当一个问题出现时不能慌张,总能解决的,不行就去查资料问朋友,对于这些东西一定要有恒心相信自己,解决之后会发现这也没啥复杂的,甚至有更好的解决方案。





Thinking about basic strategy here reminds me of pacing; it’s all about reading the table. Checking out 999phl link shows a modern vibe, much like good game flow. Keep that cool head!
Interesting read! The psychology of choosing numbers is fascinating – truly random selection is harder than it seems. Quick registration with platforms like bet1x slot makes jumping in easy, though! It’s all about informed fun, right? 😉
This deep dive into dependency hell perfectly illustrates the need for rigorous system resilience planning. Managing core services, whether it’s a Linux package manager or maintaining secure user access, requires meticulous attention to detail. Stability is non-negotiable, which is a principle we apply across all our backend operations, including securing the vipslot login. Great troubleshooting!
Yo, cái phần về quản lý ngân sách nó quan trọng vãi. Đừng chỉ nhìn vào mấy game slot hay casino là hết nha. Xem kỹ hơn ở ne88 com đi, nó giúp mình tỉnh táo hơn hẳn. 😉