我在執行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:
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 \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 \r\n file \"/usr/lib64/python2.7/locale.py\", line 19, in \r\n import functools\r\n file \"/usr/lib64/python2.7/functools.py\", line 10, in \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安裝軟體時報錯
yum安裝軟體,出錯資訊 pycurl error 6 couldn t resolve host mirrorlist.centos.org error cannot find a valid baseurl for repo base 字面意思是不能解析mirrorlist.centos.org...
yum安裝mysql8 0時候,初始化報錯
報錯日誌如下 2019 08 16t06 10 30.156632z 0 error my 010338 server can t find error message file soft src mysql mysql8 share mysql 8.0 errmsg.sys check error...
錯誤歸納 yum安裝docker ce報錯
yum安裝docker ce root docker2 yum.repos.d yum config manager add repo 設定阿里雲映象源後,yum y install docker ce時出錯 正在處理依賴關係 policycoreutils 2.5 24,它被軟體包 selinux...