rpm/rz-lz/yum: command not found

-bash: rz: command not found的解决方法

# yum -y install lrzsz

-bash: yum: command not found

查看有无 yum安装包 ,有的话卸载:

查看:rpm -qa |grep yum

卸载:rpm -aq|grep yum|xargs rpm -e --nodeps

第一步: 到这个网站去下载如下RPM包 :http://mirrors.163.com/centos/6/os/x86_64/Packages/下载 

python-urlgrabber-3.9.1-11.el6.noarch.rpm

yum-cron-3.2.29-81.el6.centos.noarch.rpm

yum-3.2.29-81.el6.centos.noarch.rpm

yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

yum-plugin-fastestmirror-1.1.30-41.el6.noarch.rpm

第二步:下载完成后安装:

rpm -ivh --force --nodeps  python-urlgrabber-3.9.1-11.el6.noarch.rpm

rpm -ivh --force --nodeps yum-metadata-parser-1.1.2-16.el6.x86_64.rpm

rpm -ivh --force --nodeps yum-3.2.29-81.el6.centos.noarch.rpm yum-plugin-fastestmirror-1.1.30

 

运行yum命令

注意:注意最后两个包必需同时安装,否则会相互依赖 

第三步:下载阿里云的yum源:
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo  

下载以后生成缓存,命令:
yum makecache 

如果有提示错误,运行下面的命令:[Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"

sed -i 's/\$releasever/6/' CentOS-Base.repo 备注:把文件里的$releasever替换为6(要在CentOS-Base.repo文件目录下使用该命令,也可以手动通过WinSCP修改)

最后:重新生成缓存,数字不为0,就OK了:
yum clean all
yum makecache

【docker】bash: rpm: command not found

使用如下命令安装

apt-get update
apt-get install rpm

 

https://www.cnblogs.com/sijizhen/p/10576288.html

https://blog.csdn.net/zzk00007/article/details/88542325

https://blog.csdn.net/u013938578/article/details/104818595/

posted @ 2020-09-14 16:42  天妖姥爷  阅读(1238)  评论(0编辑  收藏  举报