碼迷,mamicode.com
首頁 > 系統相關 > 詳細

linux之便捷安裝yum

時間:2018-12-10 18:12:09      閱讀:2229      評論: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
迷上了代碼!
河北十一选五基本走势