出现这样的问题,就是因为之前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. 【weixin】微信支付---Native支付模式二(PC端支付大多采用此模式)

    [模式二]:商户后台系统调用微信支付[统一下单API]生成预付交易,将接口返回的链接生成二维码,用户扫码后输入密码完成支付交易.注意:该模式的预付单有效期为2小时,过期后无法支付 模式二与模式一相比, ...

  2. LeetCode:181.超过经理收入的员工

    题目链接:https://leetcode-cn.com/problems/employees-earning-more-than-their-managers/ 题目 Employee 表包含所有员 ...

  3. textarea框自适应高度

    export function autoTextarea(elem, extra, maxHeight){ /**textarea文本域随内容的多少而调整高度 */ extra = extra || ...

  4. 保证在浏览器上word/图片/Excel的下载的表现形式一样

    function downloadImage(src) { console.log(src); //src="http://192.168.12.50:8181/file/common/pn ...

  5. sql分页查询(2005以后的数据库)和access分页查询

    sql分页查询: select * from ( select ROW_NUMBER() over(order by 排序条件) as rowNumber,* from [表名] where 条件 ) ...

  6. Linux系统组成和获取命令帮助4

    Linux文件系统:        1.文件名名称严格区分字符大小写        2.文件可以使用除/以外任意字符        3.文件名长度不能超过255字符        4.以.开头的文件为 ...

  7. libusb_bulk_transfer 说明

    libusb_bulk_transfer函数说明   API_EXPORTED int libusb_bulk_transfer(struct libusb_device_handle *dev_ha ...

  8. XShell 假死

    使用vim时因为使用windows word带来的坏习惯经常喜欢ctrl+s ,而这个造成的结果就是xshell假死,解决办法是ctrl+q

  9. ABC007D Small Multiple[最短路]

    题意:求$K$的倍数中数位和的最小值. 一开始有一种思路:由于产生答案的数字可能非常大,不便枚举,考虑转化为构造一个数字可以有$x\mod k=0$.然后二分答案数位和,数位DP检验是否存在,但是由于 ...

  10. Chrome报错提示Unchecked runtime.lastError: The message port closed before a response was received.

    经过查询,此错误是Chrome扩展插件引起的.由于Chrome修改了API接口,原来的请求被拦截.(Chrome 73 onwards disallows cross-origin requests ...