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"%><%@ ...
随机推荐
- SqlSever基础 convert 将类型为字符的一列转成Int类型后进行排序
镇场诗:---大梦谁觉,水月中建博客.百千磨难,才知世事无常.---今持佛语,技术无量愿学.愿尽所学,铸一良心博客.------------------------------------------ ...
- 借助Nodejs在服务端使用jQuery采集17173游戏排行信息
Nodejs相关依赖模块介绍 Nodejs的优势这里就不做介绍啦,这年头相信大家对它也不陌生了.这里主要介绍一下用到的第三方模块. async:js代码中到处都是异步回调,很多时候我们需要做同步处理, ...
- CSS属性前的 -webkit, -moz,-ms,-o
-moz-对应 Firefox, -webkit-对应 Safari and Chrome-o- for Opera-ms- for Internet Explorer(microsoft) 在CSS ...
- 快速查看SQL Server 中各表的数据量以及占用空间大小
快速查看SQL Server 中各表的数据量以及占用空间大小. CREATE TABLE #T (NAME nvarchar(100),ROWS char(20),reserved varchar(1 ...
- NFS安装过程
操作环境:linuxmint做客户端--centos7(虚拟机)做服务器 1.先安装需要的包: centos7中:yum install rpcbind && yum install ...
- FZU 2219 StarCraft(星际争霸)
Description 题目描述 ZB loves playing StarCraft and he likes Zerg most! One day, when ZB was playing SC2 ...
- Strategy策略模式
策略模式定义了一系列算法,把它们一个个封装起来,并且使它们可相互替换.该模式可使得算法能独立于使用它的客户而变化.Strategy模式是行为模式,正因为他是一种行为模式,所以他不是用来解决类的实例化的 ...
- How can I retrieve the remote git address of a repo?
When you want to show an URL of remote branches, try: git remote -v
- javascript权威指南笔记--javascript语言核心(二)
1.函数作用域:在函数内声明的所有变量在函数体内始终是可见的.这意味着在变量声明之前甚至已经可用. *“声明提前”:javascript函数里声明的所有变量(但不涉及赋值)都被提前至函数的顶部. fu ...
- MVC服务器前台提示
[HttpPost] public ActionResult AddMsg(MsgModel model) { string strSql = "insert into tbl_msg(ti ...