Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pi4 aarch64 FAILED! => "E: Package 'python-apt' has no installation candidate #565

Open
angelperezleon opened this issue Oct 18, 2023 · 1 comment

Comments

@angelperezleon
Copy link

angelperezleon commented Oct 18, 2023

TASK [Update apt repo and cache] *********************************************** fatal: [pi4]: 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:armhf python3-apt:armhf python3-apt-dbg python3-apt\n 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:armhf python3-apt:armhf python3-apt-dbg python3-apt", " python-apt-doc python-apt-common", ""]}

Anyone else getting this when trying to update via?
ansible-playbook /etc/ansible/update-basic.yml

I have 4 other Pi4 on the host file which update fine pi3's and 4's it just this 64-bit RaspbianOS aarch64 that has problems updating via ansible.

@syedayyan-3300
Copy link

The error indicates that the package 'python-apt' is not available in the repositories that your system is currently configured to use. However, there are alternative packages listed that could replace it.

To resolve this issue, you can try installing one of the alternative packages. In this case, it looks like 'python3-apt' is a suitable replacement. Modify your installation command to use 'python3-apt' instead:

try this bash command :
sudo apt-get install --no-install-recommends python3-apt -y -q

This should install the necessary package and resolve the "Package 'python-apt' has no installation candidate" error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants