Websoft9Archive / role_common

common role
Other
0 stars 5 forks source link

Debian11 Update apt cache error #27

Open qiaofeng1227 opened 2 years ago

qiaofeng1227 commented 2 years ago
TASK [role_common : Update apt repository list cache] ************************************************************************************************************************************************************************************************************************
[WARNING]: Updating cache and auto-installing missing dependency: python-apt
fatal: [8.210.251.26]: FAILED! => {"changed": false, "cmd": "apt-get install --no-install-recommends python-apt -y -q", "msg": "E: Package 'python-apt' has no installation candidate", "rc": 100, "stderr": "E: Package 'python-apt' has no installation candidate\n", "stderr_lines": ["E: Package 'python-apt' has no installation candidate"], "stdout": "Reading package lists...\nBuilding dependency tree...\nReading state information...\nPackage python-apt is not available, but is referred to by another package.\nThis may mean that the package is missing, has been obsoleted, or\nis only available from another source\nHowever the following packages replace it:\n  python3-apt-dbg python3-apt python-apt-doc python-apt-common\n\n", "stdout_lines": ["Reading package lists...", "Building dependency tree...", "Reading state information...", "Package python-apt is not available, but is referred to by another package.", "This may mean that the package is missing, has been obsoleted, or", "is only available from another source", "However the following packages replace it:", "  python3-apt-dbg python3-apt python-apt-doc python-apt-common", ""]}
chendelin1982 commented 2 years ago

why diban10 use python2 interupter, please read the ENV INTERPRETER_PYTHON_DISTRO_MAP

and you can refer to: https://sleeplessbeastie.eu/2020/02/07/how-to-instruct-ansible-to-use-specific-version-of-python/

qiaofeng1227 commented 2 years ago

you can change python env by edit this file

/usr/lib/python2.7/site-packages/ansible/config/base.yml

how to edit on ansible.cfg: https://github.com/ansible/ansible/issues/76112