Yum:[Errno 5] [Errno 2] No such file or directory
出现这样的问题,就是因为之前python2升级到python3之后,yum有些配置文件定位不到之前的python2了,所以这里需要改掉两个配置文件就不会出事了。
yum安装软件时,可以连接yum 仓库,但是下载安装时失败,报错如下
root@pts/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
Yum:[Errno 5] [Errno 2] No such file or directory的更多相关文章
- 解决 Boost安装:fatal error: bzlib.h: No such file or directory 问题
参考: How to install all the boost development libraries? 解决 Boost安装:fatal error: bzlib.h: No such fil ...
- -bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory python多版本造成额问题 找不到p ...
- tesseract编译错误:fatal error: allheaders.h: No such file or directory
错误描述: globaloc.cpp::: fatal error: allheaders.h: No such file or directory #include "allheaders ...
- 自定义容器启动脚本报错:exec user process caused "no such file or directory"
创建容器起不来,一直是restarting状态,查看容器的报错日志如下: standard_init_linux.go:178: exec user process caused "no s ...
- xmanager运行报错:bash: /usr/bin/xterm: No such file or directory
1.原因 xterm没有安装,解决办法是下载然后安装即可. 如果机器可以用yum,则直接使用yum安装xterm即可: yum install -y xterm 如果没有网络,则在某台操作系统大版本相 ...
- 小程序问题集:保存失败:Error: ENOENT: no such file or directory, open
问题如图: 当编译的时候 会提示找不到这个文件(index),但是确信项目目录里已经删除了该页面路径,并且app.json的pages列表中也没有该页面: 这时候需要看一下当前已经打开的文件中是否 ...
- webpack编译报错:Module not found: Error: Cannot resolve 'file' or 'directory' ./../../node_modules..
在同事的mac电脑上,可以正常编译,拿到我这边就出错了(⊙﹏⊙) 好像是webpack在window下的一个bug,需要让 webpack 和你的项目保持在一个盘符下,参考. 解决方法: 修改conf ...
- Mac 解决终端:-bash: /Users/xxx/.profile: No such file or directory
touch ~/.profile加入export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin 参考:https://www.zhihu.com/ ...
- 容器启动脚本报错:exec user process caused "no such file or directory"
1.现象 standard_init_linux.go:: exec user process caused "no such file or directory" 2.原因 原因 ...
- hadoop:/bin/bash: /bin/java: No such file or directory
Stack trace: ExitCodeException exitCode=127 In HADOOP_HOME/libexec/hadoop-config.sh look for the if ...
随机推荐
- C++ STL用法总结(持续更新)
Vector 动态数组 https://www.cnblogs.com/zhonghuasong/p/5975979.html lower_bound&&upper_bound htt ...
- vue开发后台管理系统有感
使用vue开发后台近一个月,今天终于完成得差不多了,期间也遇到很多的问题,所以利用现在的闲暇时间做个总结 使用element-ui基础,这次使用了vue-element-admin(github地址) ...
- 仍然有人在叫喊C语言已经过时了
现在,仍然有人在叫喊C语言已经过时了.还有什么值得学习的?看看现在使用Python.PHP和其他语言有多简单.谁去学旧的C语言?是真的吗?作者下载了这两种语言的底层源代码.由于空间的限制,它没有分析框 ...
- js页面加载时候的调用函数的方法
方法一:jquery 中:$(function(){}) 括号内写你的内容 方法二:html <body onload=''> <script type="text/jav ...
- 读micro8的一些记录与思考
最近做了一段时间的攻击,个人对于整个攻击链相对来说还是比较熟悉.看了侯师傅的文章还是学到一些,做个备忘. 1.
- PostMan 中使用Datas 文件一次Run 只能使用一个
PostMan 一次run 只能有一个文件. Note that you can only use one data file for one run.
- 1.RPC原理学习
1.什么是RPC:远程过程调用协议 RPC(Remote Procedure Call Protocol)— 远程过程调用协议,是一种通过网络从远程计算机程序上请求服务,而不需要 了解底层网络技术的协 ...
- phpMyAdmin出现Fatal error: Maximum execution time of 300 seconds
在mysql用phpMyAdmin导入大数据的时候出现:Fatal error: Maximum execution time of 300 seconds exceeded in D:/查了很多文章 ...
- 直接插入排序java代码
//直接插入排序(无哨兵) 通过测试 public class InsertSortTest{ public static void insertSort(int[] arr) { for (int ...
- C# 学习笔记第一天
1. 2000年开发出C#,2002年传入中国 2. .NET 两部分 (1). .NET 平台 好比是厨房 (2) .netframework 框架 ...