For proxy server n1, the following is the configuration of my system
When I am going click Setup Server:
The following error occurs while executing the Ansible Task:
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:
python-apt-doc python3-apt-dbg:i386 python3-apt:i386 python3-apt-dbg
python3-apt python-apt-common
Note: Ping to server working fine
Any help would be appreciated
Thanks
Hi, can you run the following command on the target server? This will give you an overview of the installed Python version.
bash -lc 'cat /etc/os-release; echo; python --version 2>&1; python3 --version 2>&1; ls -l /usr/bin/python /usr/bin/python3 2>/dev/null || true; apt-cache policy python3-apt python-apt'
Since the apt update is failing, I think the wrong Python version is being used.
This may be helpful:
opened 07:42PM - 20 Apr 20 UTC
closed 07:51PM - 20 Apr 20 UTC
This is due to Python 2 end-of-life and happened 4 days ago: https://bugs.debian… .org/cgi-bin/bugreport.cgi?bug=937579
It seems that `python3-apt` now is the way to go, but unfortunately Ansible 2.9.7 fails when using the `apt` module because it attempts to install the `python-apt` package:
```
[WARNING]: Updating cache and auto-installing missing dependency: python-apt
fatal: [10.0.0.50]: FAILED! => {
"changed": false,
"cmd": "apt-get install --no-install-recommends python-apt -y -q",
"rc": 100
}
STDOUT:
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
STDERR:
E: Package 'python-apt' has no installation candidate
MSG:
E: Package 'python-apt' has no installation candidate
```
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
Python 2.7.18
Python 3.10.12
lrwxrwxrwx 1 root root 7 Apr 15 2020 /usr/bin/python -> python2
lrwxrwxrwx 1 root root 10 Aug 8 2024 /usr/bin/python3 -> python3.10
python3-apt:
Installed: 2.4.0ubuntu4.1
Candidate: 2.4.0ubuntu4.1
Version table:
*** 2.4.0ubuntu4.1 500
500 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
100 /var/lib/dpkg/status
2.3.0ubuntu2 500
500 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
python-apt:
Installed: (none)
Candidate: (none)
Version table:
This is the output, and as per the GitHub URL you sent, I tried to set the following in proxy.yml, but still not working
Do you have any idea how to set the following parameter?
ansible_python_interpreter
I am doing the setup using this forum only, but there is a Python interpreter issue.
Hey that solve the @RocketQuack thanks for your help now facing other issue