阿里云centos无法使用yum处理方案


思路:先安装python 然后通过yum包手动安装。

1、安装python3

 

wget https://www.python.org/ftp/python/3.8.3/Python-3.8.3.tgz

tar -zxvf Python-3.8.3.tgz

mv Python-3.8.3  /usr/local/python3

make clean && make distclean  

./configure --prefix=/usr/local/python3 --with-openssl=/usr/local/openssl  

make

make install

2、安装yum

在Linux(centos)里面依次输入下面的命令:

1,下载最新的yum-3.2.28.tar.gz并解压

wget http://yum.baseurl.org/download/3.2/yum-3.2.28.tar.gz
tar xvf yum-3.2.28.tar.gz 

2,进入目录,运行安装

cd yum-3.2.28 yummain.py install yum 

如果结果提示错误: CRITICAL:yum.cli:Config Error: Error accessing file for config file:///etc/

可能是原来是缺少配置文件。在etc目录下面新建yum.conf文件,然后再次运行 yummain.py install yum,顺利完成安装。

3,最后更新系统。

yum check-update  
yum update  
yum clean all  


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM