CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory
今天尝试更新了下虚拟机CentOS中的python版本后。
运行“yum”命令,就报错:“sudo: unable to execute /bin/yum: No such file or directory”
查询了下网上的资料发现,原来yum调用是用python写的。遂想起刚刚更新python版本,忘了修改yum配置文件了。
解决办法:修改yum配置文件
[root@localhost ~]#vim /usr/bin/yum
把文件头部的#!/usr/bin/python改成#!/usr/bin/python_old //改为之前的老版本号 。
保存退出,yum即可正常使用。
如若有其他命令、软件不能正常使用,仿照yum配置文件的修改方法,修改其配置文件即可。
CentOS中输入yum报错:sudo: unable to execute /bin/yum: No such file or directory的更多相关文章
- sudo: unable to execute ./xxx.py: no such file or directory
$ ./mk_dataset.py -bash: ./mk_dataset.py: /home/ocean1101/anaconda3/bin/python^M: bad interpreter: N ...
- sudo: unable to execute ./script.sh: no such file or directory
I just had this exact problem, it turned out to be a text file encoding problem. For me to fix it wh ...
- Ubuntu 报错 sudo: unable to resolve host
Ubuntu 在每次执行命令的时候,会报如下错误: $ sudo sudo: unable to resolve host iZ2zecsdy8flu603bmdg1bZ iZ2zecsdy8flu6 ...
- centos 7安装mysql报错-bash: ./scripts/mysql_install_db: /usr/bin/perl: bad interpreter: No such file or directory
[root@localhost mysql]# ./scripts/mysql_install_db --user=mysql -bash: ./scripts/mysql_install_db: ...
- Centos7 安装Redis,报错[adlist.o] Error jemalloc/jemalloc.h: No such file or directory
redis官网 https://redis.io/download 安装 $ wget http://download.redis.io/releases/redis-5.0.4.tar.gz $ t ...
- ssh登录locale报错:cannot change locale (zh_CN.UTF-8): No such file or directory
一.登录ssh报错: Last :: from 172.28.146.109 -bash: warning: setlocale: LC_ALL: cannot change locale (en_C ...
- git报错remote: error: cannot run hooks/post-receive: No such file or directory
错误情况如下图所示: 如果你也显示这个错误但是其实在该路径上有上有这个文件,那么显然你遇到和我一样的情况,即你是Windows下创建的文件,但是试图在Lunix系统去打开它.这是在Windows下调用 ...
- navicate for mysql命令中输入中文报错
insert into xsxx(name,xb) values('李四','男') 错误提示: [SQL]insert into xsxx3(name,xb) values('李四','男') [E ...
- SSH项目中使用struts-tags报错According to TLD or attribute directive in tag file, attribute test does not accept any expressions
在运行struts2标签页面时报错,代码如下:<%@ page language="java" pageEncoding="gbk"%><%@ ...
随机推荐
- git -C
https://git-scm.com/docs/git -C <path> Run as if git was started in <path> instead of th ...
- ARM处理器启动流程
根据<<芯片手册>>查看相关内容: 1.启动方式 2.地址布局 3.启动流程
- Building,Packaging,Deploying,and Administering Applications and Types
buliding types into a module: response files: the IL disassembler:ILDasm.exe add assemblies to a pro ...
- 【CC评网】2013.第42周 话说时间管理
时间管理 工作几年之后,大家都会有意识的培养时间管理的概念:但如何真正做到位,并持续坚持,并不是一件容易的事: 虽然关注时间管理已有几年,但目前我对于时间的利用并不高效: 理论上的东西就是那些,但真正 ...
- find command in linux terminal
Say you want to search for files with keyword as "keyword". find / -name keyword 2> /de ...
- javascript权威指南笔记--javascript语言核心(三)
1.var用来声明一个或多个变量.全局变量是全局对象的属性,它无法通过delete删除. 如果var语句中的变量没有指定初始化表达式,那么这个变量的初始值为undefined. 变量声明语句会被提前到 ...
- [原]五分钟搭建gitserver
本来在忙一些事情,结果刚才突然收到一个临时的事情,号称很着急. 问了一下,原来是需要在本地搭建一个git库,但其实之前我是有做过gitserver的,不过是在阿里云(部分分布在青云)上,而且目前在使用 ...
- ruby的正则表达式-scan方法
irb(main):001:0> str_vps=%Q{viewpoint_ids: [{"id":"260e053b-d728-4785-888d-eb4f1ca ...
- openstack 排错
1.查看日志 grep ERROR /var/log/keystone/keystone.log 2. # nova list ERROR:n/a (http 404) 检查环境变量是否正确.
- POJ2676,HDU4069解决数独的两种实现:DFS、DLX
搜索实现:解决数独有两种思考策略,一种是枚举当前格能填的数字的种数,这里有一优化策略就是先搜索能填入种数小的格子:另一种是考虑处理某一行(列.宫)时,对于某一个没用过的数字,若该行(列.宫)只有一个可 ...