码迷,mamicode.com
首页 > 系统相关 > 详细

linux之便捷安装yum

时间:2018-12-10 18:12:09      阅读:2090      评论:0      收藏:0      [点我收藏+]

标签:linu   wget   sql   dep   完成   span   系统   from   error   

闲来无事倒腾一下买了半年什么什么东西都没搞的腾讯云,首先一个空空的服务器自己安装那些个玩意是真的累呀,于是准备使用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: [[email protected] 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: [[email protected] 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

标签:linu   wget   sql   dep   完成   span   系统   from   error   

原文地址:https://www.cnblogs.com/zlxyh/p/10096982.html

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!