CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory
来源:互联网 发布:linux 远程执行命令 编辑:程序博客网 时间:2024/06/14 02:12
原文:点击打开链接
今天尝试更新了下虚拟机CentOS中的python版本后。
运行“yum”命令,就报错:“sudo: unable to execute /bin/yum: No such file or directory”
查询了下网上的资料发现,原来yum调用是用python写的。遂想起刚刚更新python版本,忘了修改yum配置文件了。
解决办法:修改yum配置文件
1
[root@localhost ~]
#vim /usr/bin/yum
把文件头部的#!/usr/bin/python改成#!/usr/bin/python_old //改为之前的老版本号 。
保存退出,yum即可正常使用。
如若有其他命令、软件不能正常使用,仿照yum配置文件的修改方法,修改其配置文件即可。
阅读全文
0 0
- CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory
- linux输入yum后提示: -bash: /usr/bin/yum: No such file or directory的解决方案
- -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
- -bash: /usr/bin/yum: /usr/bin/python2.6.62.6.6: bad interpreter: No such file or directory
- centos下执行脚本,报错: /bin/bash^M: bad interpreter: No such file or directory
- sudo su "Cannot execute bash: No such file or directory"
- centos启动zookeeper报错:No such file or directory FAILED TO WRITE PID
- error: unable to invoke subcommand: /usr/bin/swift-build (No such file or directory)
- 解决No such file or directory报错和command 'sudo' is avaible in '/usr/bin/sudo' the command could ..报错
- 使用yum命令时报 "No such file or directory"
- mac下安装mysql-python包报unable to execute llvm-gcc-4.2: No such file or directory error: command 'llvm-g
- centos sonar Unable to start JVM: No such file or directory
- centos sonar Unable to start JVM: No such file or directory
- mycat启动报Unable to start JVM: No such file or directory (2)
- “-bash: /usr/local/bin/npm: No such file or directory” centos7 nodejs yum安装包损坏的修复
- startx报错xinit: No such file or directory (errno 2): unable to connect to X server xinit: No such pr
- unable to execute No such file or directory,32位linux编译的程序在64位linux运行不了
- Linux下使用RecordMyDesktop进行屏幕录像 输出图像格式转换
- swift gcd 定时器。获取验证码
- css3新特性
- 文字处理控件TX Text Control .NET for WPF 历史大版本X14发布 | 附下载
- DBhelper的使用
- CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory
- html学习笔记(一)
- Android实现国际化
- 面向对象程序设计的术语
- 欢迎使用CSDN-markdown编辑器
- 【HDU
- Pyhton核心编程第二版第八章练习8-8,8-9
- 在Ubuntu系统连接BBB开发板
- tarjan算法