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"%><%@ ...
随机推荐
- 使用mysql数据库,插入数据出现问号(?)的问题,解决方法
首先,我用的mysql数据库是5.7.12版本. 出现的问题: 1.插入数据显示错误,插入不成功,出现:Incorrect string value: '\xCD\xF5\xD5\xBC\xBE\xA ...
- UVA 607 二十二 Scheduling Lectures
Scheduling Lectures Time Limit:3000MS Memory Limit:0KB 64bit IO Format:%lld & %llu Submi ...
- FZU 2148 Moon Game
Moon Game Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit St ...
- 一个关于echo的小知识点
一个关于echo的小知识点 echo一个布尔值时,如果是true,输出1,而如果是false,将什么都不输出! 网上搜的一个解释: 对于数字类型来说,false 确实 是 0, 而对strin ...
- @JoinColumn
@OneToOne注释只能确定实体与实体的关系是一对一的关系,不能指定数据库表中的保存的关联字段.所以此时要结合@JoinColumn标记来指定保存实体关系的配置. @JoinColumn与本书上一章 ...
- Protractor AngularJS测试框架教程
Protractor是一个建立在WebDriverJS基础上的端到端(E2E)的AngularJS JavaScript Web应用程序测试框架.Protractor全自动化真实的模拟用户在真正的浏览 ...
- yii 常用路径
yii::app()->homeurl //主页的网址 yii系统变量. //得到proteced目录的物理路径 Yii::app()->basePath; 调用YII框架中jquery: ...
- jquery 跳转到当前页面指定位置
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- mongoDB中的ID的生成原则
- JavaScript基础知识之——Location 对象详解
属性 描述 location.hash 设置或取得 URL 中的锚 location.host 设置或取得 URL 中主机(包括端口号) location.hostname 设置或取得 URL 中的主 ...