yum安装的时候报错,关于python的函数库
我在执行yum -y install nc命令的时候出现如下报错
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
cannot import name partial
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.5 (default, May 3 2017, 07:55:04)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-14)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
ansible远程执行 ansible -i ./hosts all -m ping 的时候也有个报错
10.4.38.129 | FAILED! => {
"changed": false,
"module_stderr": "Shared connection to 10.4.38.129 closed.\r\n",
"module_stdout": "\r\nTraceback (most recent call last):\r\n File \"/home/xtwh/.ansible/tmp/ansible-tmp-1552962762.09-256674951838735/AnsiballZ_command.py\", line 113, in <module>\r\n _ansiballz_main()\r\n File \"/home/xtwh/.ansible/tmp/ansible-tmp-1552962762.09-256674951838735/AnsiballZ_command.py\", line 105, in _ansiballz_main\r\n invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n File \"/home/xtwh/.ansible/tmp/ansible-tmp-1552962762.09-256674951838735/AnsiballZ_command.py\", line 44, in invoke_module\r\n from ansible.module_utils import basic\r\n File \"/tmp/ansible_command_payload_ZJtc3_/ansible_command_payload.zip/ansible/module_utils/basic.py\", line 67, in <module>\r\n File \"/usr/lib64/python2.7/locale.py\", line 19, in <module>\r\n import functools\r\n File \"/usr/lib64/python2.7/functools.py\", line 10, in <module>\r\n from _functools import partial, reduce\r\nImportError: cannot import name partial\r\n",
"msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
"rc": 1
}
以上报错是同一台服务器,判断为python的函数库出问题
解决方案
#cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.4 (Maipo)
#python -V
Python 2.7.5
将问题主机的/lib64/python2.7目录备份,找一台没问题的服务器,同目录下的所有文件拷贝过来,就解决问题了
yum安装的时候报错,关于python的函数库的更多相关文章
- yum安装Development Tools报错问题
yum安装Development Tools报错问题 我们通过yum安装Development Tools开发组工具的时候,有时可能会遇到如下报错信息. [root@superdesktop ~]# ...
- keepalived yum安装后启动报错解决
[root@centos8 ~]yum install keepalived -y [root@centos8 ~]systemctl start keepalived.services [root@ ...
- Cenots 7 通过Yum 安装Node.js 报错问题
环境:CentOS Linux release 7.3.1611 (Core) 安装报错信息: [cenots7@localhost ~]$ sudo yum -y install npm Loade ...
- 利用yum安装时,报错 [Errno 256] No more mirrors to try.
问题: [root@gg ~]# yum install -y perl-DBD-MySQL Loaded plugins: product-id, refresh-packagekit, secu ...
- yum安装zabbix故障报错
装zabbix时报错 [root@zabbix ~]# rpm -ivh zabbix-server-mysql-2.2.3-1.el6.x86_64.rpm zabbix-web-mysql-2.2 ...
- python 3.5.2安装mysql驱动报错
python 3.5.2安装mysql驱动报错 python 3.5.2安装mysql驱动时出现如下异常: [root@localhost www]# pip install mysql-connec ...
- 【python】python安装tensorflow报错:python No matching distribution found for tensorflow==1.12.0
python安装tensorflow报错:python No matching distribution found for tensorflow==1.12.0 python版本是3.7.2 要安装 ...
- LINUX下编译安装PHP各种报错大集合
本文为大家整理汇总了一些linux下编译安装php各种报错大集合 ,感兴趣的同学参考下. nginx1.6.2-mysql5.5.32二进制,php安装报错解决: 123456 [root@clien ...
- open-falcon ---安装Dashboard时候报错"SSLError: The read operation timed out"
在部署open-falcon环境过程中,安装Dashboard时候报错"SSLError: The read operation timed out".如下: [root@open ...
随机推荐
- $Django 发送邮件--django封装模块和python内置SMTP模块
一 使用SMTP模块发送邮件 import smtplib from email.mime.text import MIMEText from email.header import Header m ...
- List<T>常用操作
1.List<T>类型强制转换: List<UIData> datalist=null;datalist.ConvertAll<object>(input => ...
- [C]变量作用域
函数环境变量作用域 C语言栈环境变量作用域跟JS是类似的. 就是内部函数可以访问外部函数的执行(栈)环境变量. 当访问一个变量时,程序将会查询当前栈环境是否存在这个变量,如果没有,将会往上层栈环境继续 ...
- .htaccess技巧: URL重写(Rewrite)与重定向
URL重定向是.htaccess的重头戏,它可以将长地址转为短地址.将动态地址转为静态地址.重定向丢失的页面.防止盗链.实现自动语言转换等.笔者觉得难点是在正则表达式的运用和理解上.有关htacces ...
- js——prototype、__proto__、constructor
Object 1. Object是一个函数(typeof O ...
- Confluence 6 管理协同编辑 - 修改编辑模式
编辑模式确定了你站点所有用户使用协同编辑的体验,这个是你对协同编辑进行启用和关闭的地方. 希望修改编辑模式: 进入 > 基本配置(General Configuration) > 协同编 ...
- Confluence 6 用户宏示例 - Formatted Panel
下面的用演示了如果还写一个用户宏,并在这个宏中创建一个格式化的面板,并且指定颜色.将会创建下面的面板: (Title) 注意:这个面板的标题为空,如果你没有给这个面板标题参数的话. Macro n ...
- bat如何实现多台android设备同时安装多个apk
背景:在做预置资源(安装apk)时,有多台android设备需要做相同的资源(如:10台,安装10个apk).一台一台去预置的话(当然也可以每人一台去预置),耗时较长有重复性. 问题:如何去实现多台同 ...
- 获取checkbox勾选的id
需求描述:做批量删除或者批量修改的时候需要获得多个id,根据checkbox勾选来获取对应的d 两种方法: //html代码<table id="table1"> &l ...
- <a>之间怎么放值</a> 挺简单的,第一次遇到···
需求描述:对列表中的某一列内容添加a标签(其实就是对td标签下添加a标签了). 思路简介:拿到这个我首先的反应就是在td标签对text获取内容的代码中动态拼接<a></a>字符 ...