linux之便捷安装yum
Posted ZLXYH
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux之便捷安装yum相关的知识,希望对你有一定的参考价值。
闲来无事倒腾一下买了半年什么什么东西都没搞的腾讯云,首先一个空空的服务器自己安装那些个玩意是真的累呀,于是准备使用yum,这是一篇简易安装yum的简易教程
1.首先下载yum的压缩包(下面的包不一定是最新的最新的包去http://yum.baseurl.org/download/自己找哦)
下载
wget http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz
解压
tar xvf yum-3.2.28.tar.gz(这样解压后的文件会在root中)
2.运行安装
首先在etc中创建yum而配置文件一yum.conf
touch /etc/yum.conf
进入yum的解压目录我的就在root里面(如果不知道文件被解压到哪里了用find -name去找)
cd /root/yum-3.2.28
运行下面的语句
./yummain.py install yum
3.其他问题(报错):
报错1: [root@akinlau yum-3.4.3]# ./yummain.py Traceback (most recent call last): File “./yummain.py”, line 28, in <module> from yum import Errors File “/root/nagios/yum-3.4.3/yum/__init__.py”, line 52, in <module> import config File “/root/nagios/yum-3.4.3/yum/config.py”, line 30, in <module> from parser import ConfigPreProcessor, varReplace File “/root/nagios/yum-3.4.3/yum/parser.py”, line 4, in <module> import urlgrabber ImportError: No module named urlgrabber
报错2: [root@akinlau yum-3.4.3]# ./yummain.py Traceback (most recent call last): File “./yummain.py”, line 28, in <module> from yum import Errors File “/root/nagios/yum-3.4.3/yum/__init__.py”, line 55, in <module> import rpmsack File “/root/nagios/yum-3.4.3/yum/rpmsack.py”, line 38, in <module> import yum.depsolve File “/root/nagios/yum-3.4.3/yum/depsolve.py”, line 30, in <module> from transactioninfo import TransactionMember File “/root/nagios/yum-3.4.3/yum/transactioninfo.py”, line 32, in <module> from sqlitesack import YumAvailablePackageSqlite File “/root/nagios/yum-3.4.3/yum/sqlitesack.py”, line 26, in <module> import yumRepo File “/root/nagios/yum-3.4.3/yum/yumRepo.py”, line 33, in <module> import sqlitecachec ImportError: No module named sqlitecachec
如果报错如上在:http://rpm.pbone.net/ 中找到自己的系统版本,下载python-urlgrabber,python-pycurl,yum-metadata-parser这3个包
例如:
首先找到python-pycurl对应包
运行wget http://rpmfind.net/linux/centos/7.5.1804/os/x86_64/Packages/python-pycurl-7.19.0-19.el7.x86_64.rpm
在etc中运行 rpm -ivh python-pycurl-7.19.0-19.el7.x86_64.rpm
其他两个包重复如上步骤
最后yum安装完成~
以上是关于linux之便捷安装yum的主要内容,如果未能解决你的问题,请参考以下文章