yum 安装,可以list,但是无法安装Error downloading packages: 。。。。 No such file or directory
# yum install nano
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package nano.x86_64 :2.3.-.el7 will be installed
--> Finished Dependency Resolution Dependencies Resolved =====================================================================================================================================================
Package Arch Version Repository Size
=====================================================================================================================================================
Installing:
nano x86_64 2.3.-.el7 os k Transaction Summary
=====================================================================================================================================================
Install Package Total download size: k
Installed size: 1.6 M
Is this ok [y/d/N]: y
Downloading packages: Error downloading packages:
nano-2.3.-.el7.x86_64: [Errno ] [Errno ] No such file or directory
解决方法 ,在下面两个目录开头,把python改为python2
/usr/bin/yum
/usr/libexec/urlgrabber-ext-down
问题原因:
这个是因为系统之前安装python3,原来版本是2.,升级python3建立软连接时把python改为了python2,yum 调用python找不到2.7的版本了