linux 装完yum不能用,解决yum不能正常使用的问题
解决yum不能正常使用的问题
问题1
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 19 M RSS (303 MB VSZ)
Started: Wed Mar 21 11:11:28 2018 - 02:52 ago
State : Traced/Stopped, pid: 6373
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum
Memory : 19 M RSS (303 MB VSZ)
Started: Wed Mar 21 11:11:28 2018 - 02:54 ago
State : Traced/Stopped, pid: 6373
解决方法:
1、这是yum被锁了,是因为之前执行了一遍未把进程完整的停掉
ps aux | grep yum |grep -v grep |awk ‘{print $2}’ | xargs kill -9
2、直接删掉yum的pid文件,pid文件是用来管理服务的启动,关闭。
rm -rf /var/run/yum.pid
问题2
# yum install lrzsz -y
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib64/python2.6/site-packages/pycurl.so: undefined symbol: CRYPTO_set_locking_callback
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.6.6 (r266:84292, Nov 22 2013, 12:16:22)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
解决:
rm -f /var/lib/rpm/__db*
rpm --rebuilddb
再安装,需要加上sudo
sudo yum install lrzsz -y
问题3、
1、使用yum安装测试
# yum install iotop
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.13 (default, Nov 13 2017, 14:44:54)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
备注:没有模块yum
2、查看yum使用的语言
# which yum `
/usr/bin/yum
[root@hm_wwwyufabu_216_37 ~]# cat /usr/bin/yum
#!/usr/bin/python (使用的是Python的默认版本)
import sys
try:
import yum
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was
```:
.................................
备注:
Python编写的,调用yum模块失败
3、查看Python版本
# python
python python2 python2.4 python2.7
# python (Python默认版本调用失败)
Python 2.7.13 (default, Nov 13 2017, 14:44:54)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named yum
>>>
[1]+ Stopped python
# python2 (python2版本调用失败)
Python 2.7.13 (default, Nov 13 2017, 14:44:54)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-55)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
Traceback (most recent call last):
File "", line 1, in
ImportError: No module named yum
>>>
[2]+ Stopped python2
# python2.4 (Python2.4版本调用成功)
Python 2.4.3 (#1, Jan 21 2009, 01:10:13)
[GCC 4.1.2 20071124 (Red Hat 4.1.2-42)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import yum
>>>
4、修改yum文件中的Python版本
# cat /usr/bin/yum
#!/usr/bin/python2.4
import sys
try:
import yum
except ImportError:
print >> sys.stderr, """\
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
linux 装完yum不能用,解决yum不能正常使用的问题相关推荐
- 【Linux】使用阿里yum源,解决yum下载过慢的问题
yum的默认地址下载太慢,用国内比较稳定的阿里云源就可以解决这个问题. 使用阿里yum源 1.备份系统自带yum源配置文件/etc/yum.repos.d/CentOS-Base.repo mv /e ...
- linux显卡驱动运行情况,Linux装完显卡驱动后分辨率显示不正常的解决方法
不少人在更新完Linux显卡驱动后,出现分辨率显示不正常的现象,遇到这类问题不用担心,下面小编就教你如何解决Linux显卡驱动安装后分辨率无法正常显示的问题,一起来学习下吧. 驱动安装: 这里得说明一 ...
- linux系统分辨率没有,Linux装完显卡驱动后分辨率无法正常显示怎么办?
不少人在更新完Linux显卡驱动后,出现分辨率显示不正常的现象,遇到这类问题不用担心,下面小编就教你如何解决Linux显卡驱动安装后分辨率无法正常显示的问题,一起来学习下吧. 驱动安装: 这里得说明一 ...
- linux装完windows时间长,重装Windows 10上的Linux子系统
之前听说Windows 10上面可以装Linux了,一时兴起,就捣鼓了起来,长时间不用了,结果又忘记root密码.哎,老了,记不住事情了.所以就上网查了一下如何卸载Linux子系统,再写一篇笔记吧,免 ...
- linux装完显卡驱动分辨率低,装上显卡驱动后屏幕分辨率变低了,肿么破。。。...
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 00:00.0 Host bridge: Intel Corporation 2nd Generation Core Processor Family D ...
- linux没有mysql.server,[linux]centos7下解决yum install mysql-server没有可用包
第一步:安装从网上下载文件的wget命令 [root@master ~]# yum -y install wget 第二步:下载mysql的repo源 [root@master ~]# wget ht ...
- centos7装完chrome无法使用yum问题解决
2019独角兽企业重金招聘Python工程师标准>>> 续前文装好chrome后,yum居然用不了,提示错误"Basic XLib functionality test f ...
- 解决linux 升级高版本python3.7后yum不能使用的问题
解决linux 升级高版本python3.7后yum不能使用的问题 参考文章: (1)解决linux 升级高版本python3.7后yum不能使用的问题 (2)https://www.cnblogs. ...
- Linux进程被锁定,解决yum时出现 /var/run/yum.pid 已被锁定,PID 为 3548 的另一个程序正在运行。...
在CentOS 7.5下使用yum时出现系统处于锁定状态的解决方法. 问题如下: [linuxidc@localhost Linux公社 www.linuxidc.com]$ sudo yum ins ...
最新文章
- python not instance_python isinstance 判断各种类型的小细节|python3教程|python入门|python教程...
- 关于mysql数据库的外键插入报错:Cannot add or update a child row: a foreign key constraint fails,完整性问题
- 带你快速了解 Docker 和 Kubernetes
- 算法的封装与切换——策略模式
- 服务容错保护断路器Hystrix之七:做到自动降级
- 放纵的感觉其实没有想象的那么好!
- java 匿名初始化_Java:双括号初始化 /匿名内部类初始化法
- editplus查找文件中的字符串
- 获取Activity当前屏幕方向。
- WIN10如何管理开机启动项?
- Java使用Spire.pdf提取PDF中想要的图片
- 无法加载 MySQL ODBC 5.3 Unicode Driver ODBC 驱动程序的安装例程,因为存在错误代码126.
- Matlab:成功解决In an assignment A(I)=B,the number of elements in B and I must be the same
- 计算机网络掉线,电脑网络经常掉线的解决方法
- 僵尸网络是什么;僵尸网络有什么特点
- C++complex复数类
- 搞笑git 程序员改bug_这些神奇又搞笑的bug,真的让程序员万万没想到!
- Win10系统上搭建GIT本地服务器
- css做八边形图片有边框
- 测试员入职新公司如何快速熟悉新业务?
热门文章
- 一个项目的简单开发流程——需求、数据库、编码
- 《Android开发从零开始》——17.Service学习(3)
- Cs Tip19: 高亮Blog Owner的评论
- Elasticsearch数据迁移工具elasticdump工具
- cmd 出现The system cannot write to the specified device问题时如何解决
- The servlet name already exists.解决方法
- 关于缓存穿透,缓存击穿,缓存雪崩,热点数据失效问题的解决方案
- .Net Core新建解决方案,添加项目引用,使用VSCode调试
- iOS报错:linker command failed with exit code 1 (use -v to see invocation) 问题解决方式之一
- 第一次使用pyqt5解决的几个小问题