出现这样的问题,就是因为之前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的更多相关文章

  1. 解决 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 ...

  2. -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 ...

  3. tesseract编译错误:fatal error: allheaders.h: No such file or directory

    错误描述: globaloc.cpp::: fatal error: allheaders.h: No such file or directory #include "allheaders ...

  4. 自定义容器启动脚本报错:exec user process caused "no such file or directory"

    创建容器起不来,一直是restarting状态,查看容器的报错日志如下: standard_init_linux.go:178: exec user process caused "no s ...

  5. xmanager运行报错:bash: /usr/bin/xterm: No such file or directory

    1.原因 xterm没有安装,解决办法是下载然后安装即可. 如果机器可以用yum,则直接使用yum安装xterm即可: yum install -y xterm 如果没有网络,则在某台操作系统大版本相 ...

  6. 小程序问题集:保存失败:Error: ENOENT: no such file or directory, open

    问题如图: 当编译的时候 会提示找不到这个文件(index),但是确信项目目录里已经删除了该页面路径,并且app.json的pages列表中也没有该页面:   这时候需要看一下当前已经打开的文件中是否 ...

  7. webpack编译报错:Module not found: Error: Cannot resolve 'file' or 'directory' ./../../node_modules..

    在同事的mac电脑上,可以正常编译,拿到我这边就出错了(⊙﹏⊙) 好像是webpack在window下的一个bug,需要让 webpack 和你的项目保持在一个盘符下,参考. 解决方法: 修改conf ...

  8. 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/ ...

  9. 容器启动脚本报错:exec user process caused "no such file or directory"

    1.现象 standard_init_linux.go:: exec user process caused "no such file or directory" 2.原因 原因 ...

  10. 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 ...

随机推荐

  1. 使用SSH连接AWS服务器

    使用SSH连接AWS服务器 一直有一台AWS云主机,但是之前在Windows平台都是使用Xshell连接的,换到Ubuntu环境之后还没有试,昨天试了一下,终于使用SSH连接成功了,这里记录一下步骤: ...

  2. O029、教你看懂OpenStack日志

    参考https://www.cnblogs.com/CloudMan6/p/5456484.html   instance 从创建到删除的整个生命周期都是有 Nova 管理的,后面各小节我们以inst ...

  3. C语言无法使用引用,一定要使用怎么办? ------指针的指针做参数

    #include <stdio.h> #include <stdlib.h> #include <string.h> void fun1(char** s); vo ...

  4. 如何将编译后的文件打包成jar文件

    如果需要修改像spring和dubbo中的jar包源码,修改后怎么打包呢? 如下: 1.win+r进入命令行: 2.找到需要打包的class文件: 3.jar -cvf [jar包的名字] [需要打包 ...

  5. redis集群+JedisCluster+lua脚本实现分布式锁(转)

    https://blog.csdn.net/qq_20597727/article/details/85235602 在这片文章中,使用Jedis clien进行lua脚本的相关操作,同时也使用一部分 ...

  6. JS中数组与对象的遍历方法实例小结

    一.数组的遍历: 首先定义一个数组 1 arr=['snow','bran','king','nightking']; 1.for循环,需要知道数组的长度; 2.foreach,没有返回值,可以不知道 ...

  7. 配置Notepad++万能调试

    需求: 正常情况下 使用notepad++编辑修改一些网页或脚本文件,修改之后想要查看效果需要Ctrl+S保存,然后从文件目录中打开查看. 现在我想做的就是简化查看效果的流程,让notepad++实现 ...

  8. linux 内核网络数据包接收流程

    转:https://segmentfault.com/a/1190000008836467 本文将介绍在Linux系统中,数据包是如何一步一步从网卡传到进程手中的. 如果英文没有问题,强烈建议阅读后面 ...

  9. spket IDE插件更新地址

    http://www.agpad.com/update spket  IDE插件更新地址

  10. 4.Shell 判断用户的参数

    1.Shell 判断用户的参数 系统在执行mkdir命令时会判断用户输入的信息,即判断用户指定的文件夹名称是否已经存在,如果存在则提示报错:反之则自动创建. Shell脚本中的条件测试语法可以判断表达 ...