Yum:[Errno 5] [Errno 2] No such file or directory
程序员文章站
2022-07-15 16:56:49
...
[email protected]/0 # yum install httpd
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirrors-internal.yyhu.com
* extras: mirrors-internal.yyhu.com
* updates: mirrors-internal.yyhu.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 httpd.x86_64.0.2.4.6-67.el7.centos.6 将被 安装
--> 解决依赖关系完成
依赖关系解决
==========================================================================================================================================================================================
Package 架构 版本 源 大小
==========================================================================================================================================================================================
正在安装:
httpd x86_64 2.4.6-67.el7.centos.6 updates 2.7 M
事务概要
==========================================================================================================================================================================================
安装 1 软件包
总下载量:2.7 M
安装大小:9.4 M
Is this ok [y/d/N]: y
Downloading packages:
Error downloading packages:
httpd-2.4.6-67.el7.centos.6.x86_64: [Errno 5] [Errno 2] 没有那个文件或目录
这个是因为系统之前升级过python,原来版本是2.7,升级python3后,yum 调用python找不到2.7的版本了
有两个配置文件需要修改
/usr/bin/yum
/usr/libexec/urlgrabber-ext-down
分别将文件开头的声明路径改正确,改回2.7的版本
#! /usr/bin/env python2.7
推荐阅读
-
Presto 启动报错 : ERROR: [Errno 2] No such file or directory (原因及解决办法)
-
FileNotFoundError: [Errno 2] No such file or directory: ‘errors.out‘ (python自然语言处理 5.6 最后的示例报错)
-
Django报错:python: can‘t open file ‘manage.py‘: [Errno 2] No such file or directory
-
python: can‘t open file ‘sqlmap.py‘: [Errno 2] No such file or directory
-
Python open: FileNotFoundError: [Errno 2] No such file or directory
-
IOError: [Errno 2] No such file or directory
-
Yum:[Errno 5] [Errno 2] No such file or directory
-
Yum:[Errno 5] [Errno 2] No such file or directory
-
FileNotFoundError: [Errno 2] No such file or directory:
-
Yum:[Errno 5] [Errno 2] No such file or directory