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"%><%@ ...
随机推荐
- centos7 安装 mariadb 的正确命令
使用的是linode的centos7系统,安装mysql发现已经默认的是mariadb. 但是不管是使用linode官网说明还是百度搜索到的的根本安装方法无法安装成功. 总是提示这一句: ERROR ...
- excel小写金额转换成中文大写
假设 假设数据在A1单元格 任何一个个单元格输入公式=TEXT(INT(A1),"[dbnum2]")&"元"&IF(INT(A1*10)-IN ...
- 手机开机画面制作工具(LogoBuilder)
手机开机画面制作工具(LogoBuilder) 本人想在自己的设备中采用其他设备上开机的logo,首先需要此设备上的logo.bin,然后用LogoBuilder解压出来,具体步骤如下: 1. ...
- Cheatsheet: 2014 11.01 ~ 11.30
Mobile Android SDK: Working with Picasso View Debugging in Xcode 6 5 Common C# tasks in Apple Swift ...
- 【转载】ODBC, OLEDB, ADO, ADO.Net的演化简史
原文:ODBC, OLEDB, ADO, ADO.Net的演化简史 1.演变历史 它们是按照这个时间先后的顺序逐步出现的,史前->ODBC->OLEDB->ADO->ADO.N ...
- 关于mysqli_fetch_assoc的一点说明
关于mysqli_fetch_assoc的一点说明 如下2种用法是错误的: 错误1 .... $fetchResult = mysqli_fetch_assoc($queryResult); ...
- Using Post_Query Trigger in Oracle Forms
When a query is open in the block, the Post-Query trigger fires each time Form Builder fetches a rec ...
- [HDOJ5773]The All-purpose Zero(贪心,DP)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5773 题意:给n个数,其中0可以用任何数字代替,问如何替换0使整个数列中的LIS最长. 0可以用任何数 ...
- [Effective Java]第二章 创建和销毁对象
声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...
- bzoj 1588: [HNOI2002]营业额统计 treap
1588: [HNOI2002]营业额统计 Time Limit: 5 Sec Memory Limit: 162 MBSubmit: 13902 Solved: 5225[Submit][Sta ...