cloudpods
cloudpods copied to clipboard
[求助/Help] it looks like a python issue,[Errno 2] No such file or directory: '/usr/bin/python': '/usr/bin/python'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error
TASK [common : install misc obsolete packages] *********************************
failed: [172.30.11.109] (item=yunion-qemu-2.12.1) => {"ansible_index_var": "item_index", "ansible_loop_var": "package_item", "changed": false, "item_index": 0, "module_stderr": "/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/module_utils/urls.py:176: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.\nTraceback (most recent call last):\n File \"<stdin>\", line 100, in <module>\n File \"<stdin>\", line 92, in _ansiballz_main\n File \"<stdin>\", line 41, in invoke_module\n File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n return _run_module_code(code, init_globals, run_name, mod_spec)\n File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n mod_name, mod_spec, pkg_name, script_name)\n File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n exec(code, run_globals)\n File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/modules/yum.py\", line 1728, in <module>\n File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/modules/yum.py\", line 1724, in main\n File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/modules/yum.py\", line 1604, in run\n File \"/tmp/ansible_ansible.legacy.yum_payload_pf62xpeb/ansible_ansible.legacy.yum_payload.zip/ansible/module_utils/common/respawn.py\", line 43, in respawn_module\n File \"/usr/lib64/python3.6/subprocess.py\", line 287, in call\n with Popen(*popenargs, **kwargs) as p:\n File \"/usr/lib64/python3.6/subprocess.py\", line 729, in __init__\n restore_signals, start_new_session)\n File \"/usr/lib64/python3.6/subprocess.py\", line 1364, in _execute_child\n raise child_exception_type(errno_num, err_msg, err_filename)\nFileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/python': '/usr/bin/python'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "package_item": "yunion-qemu-2.12.1", "rc": 1}
I'm having an issue like this with my installation, it looks like a python issue python is present in my server
@QiangQiangshiyanshi, could you please check if /usr/bin/python
is present on 172.30.11.109?
If not, could you please check what your default Python is (e.g., /usr/bin/python3
, /usr/bin/python36
, etc.)?
Then, create a soft link like this:
ln -sf /usr/bin/python3 /usr/bin/python # you may revise this commandline according to your environment.
After that, please re-run the ocboot deploy procedure. Please feel free to provide feedback with your latest updates.
It looks like the problem is a little less, but it still hasn't been solved, it looks like it's a python2 and python3 version problem
failed: [172.30.11.109] (item=yunion-qemu-2.12.1) => {"ansible_index_var": "item_index", "ansible_loop_var": "package_item", "changed": false, "item_index": 0, "msg": "The Python 2 bindings for rpm are needed for this module. If you require Python 3 support use the `dnf` Ansible module instead.. The Python 2 yum module is needed for this module. If you require Python 3 support use the `dnf` Ansible module instead.", "package_item": "yunion-qemu-2.12.1"}
@QiangQiangshiyanshi
remove any ansible that is installed by dnf
/yum
, then install ansible with pip
:
dnf install -y python3-pip
python3 -m pip install -U pip; python3 -m pip install -U setuptools wheel && python3 -m pip install 'ansible<=9.0.0'
then run ocboot again.
Thanks