Hello Ayappan P,
Thank you so much for your quickly update.
In the meanwhile, I've decided to download the "dnf_bundle_aix_73_v12.tar" for new install python3.9 with the following steps.
1. After download file: dnf_bundle_aix_73_v12.tar and extract done.
2. Then execute "./install_dnf.sh -d" command.
3. Verify new python3.9 installed.
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/dnf_bundle_aix_73_v12> which python3.9
/opt/freeware/bin/python3.9
4. Verify the issue about the "ansible --version" throws errors "/opt/freeware/bin/ansible[2]: /opt/freeware/bin/ansible.orig: not found.".
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/dnf_bundle_aix_73_v12> ansible --version
ERROR: No module named 'markupsafe'
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/dnf_bundle_aix_73_v12>
5. Download and install prm file: python3.9-markupsafe-2.1.2-1.aix7.1.ppc.rpm
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/CK-6May24-[Python3.9-AIX7.3]> rpm -ivh python3.9-markupsafe-2.1.2-1.aix7.1.ppc.rpm
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:python3.9-markupsafe-2.1.2-1 ################################# [100%]
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/CK-6May24-[Python3.9-AIX7.3]>
6. Check the "ansible --version" and "ansible-galaxy --version" was work fines.
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/dnf_bundle_aix_73_v12> ansible --version
ansible [core 2.14.13]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/freeware/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/freeware/bin/ansible.orig
python version = 3.9.16 (main, Jun 28 2023, 12:45:03) [GCC 8.3.0] (/opt/freeware/bin/python3.9)
jinja version = 3.1.2
libyaml = False
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/dnf_bundle_aix_73_v12>
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/dnf_bundle_aix_73_v12> ansible-galaxy --version
ansible-galaxy [core 2.14.13]
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /opt/freeware/lib/python3.9/site-packages/ansible
ansible collection location = /root/.ansible/collections:/usr/share/ansible/collections
executable location = /opt/freeware/bin/ansible-galaxy.orig
python version = 3.9.16 (main, Jun 28 2023, 12:45:03) [GCC 8.3.0] (/opt/freeware/bin/python3.9)
jinja version = 3.1.2
libyaml = False
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13/dnf_bundle_aix_73_v12>
Regards and thanks.
CK.
------------------------------
CHARIN KUMJUDPAI
------------------------------
Original Message:
Sent: Mon May 06, 2024 04:06 AM
From: Ayappan P
Subject: AIX 7300-02 installed and "ansible --version" throws errors "/opt/freeware/bin/ansible[2]: /opt/freeware/bin/ansible.orig: not found.".
You get this weird "not found" errors if you don't have the related software which the shebang points to.
In this case, ansible.orig has the shebang as "/opt/freeware/bin/python3.9" which is provided by AIX Toolbox python3.9 rpm. You need AIX Toolbox python3.9 rpm to run any python3 based package from AIX Toolbox (in this case ansible). AIX base python3 (lpp fileset) is no replacement for AIX Toolbox python3 (rpm). It can't be used to run any python3 packages from Toolbox.
------------------------------
Ayappan P
Original Message:
Sent: Mon May 06, 2024 12:29 AM
From: CHARIN KUMJUDPAI
Subject: AIX 7300-02 installed and "ansible --version" throws errors "/opt/freeware/bin/ansible[2]: /opt/freeware/bin/ansible.orig: not found.".
ENV: AIX 7300-02-01-2346
1. Installed.
Downloaded the ansible rpms (ansible-core:2.14.13 and ansible:7.2.0)
1.1 Installed details.
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> rpm -qa
AIX-rpm-7.3.2.1-1.ppc
ansible-7.2.0-1.noarch
ansible-core-2.14.13-1.noarch
python3-pyyaml-5.4.1.1-2.ppc
python3.9-pyyaml-5.4.1.1-2.ppc
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13>
1.2. Python3.9 from OS installed.
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> lslpp -l |grep python
python3.9.base 3.9.17.1 COMMITTED Python 3.9 64-bit binary
python3.9.base 3.9.17.1 COMMITTED Python 3.9 64-bit binary
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13>
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> which python3.9
/usr/bin/python3.9
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> python3.9 -V
Python 3.9.17
2. ENV settings.
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> env |grep PATH
PATH=/opt/freeware/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java8_64/jre/bin:/usr/java8_64/bin
LOCPATH=/usr/lib/nls/loc
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%l.%c/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/%l.%c/%N.cat:/usr/lib/nls/msg/%l.%c/%N:/usr/lib/nls/msg/%l.%c/%N.cat
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13>
3. Errors when run "ansible --version" and "ansible-galaxy --version"
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> ansible --version
/opt/freeware/bin/ansible[2]: /opt/freeware/bin/ansible.orig: not found.
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> ansible-galaxy --version
/opt/freeware/bin/ansible-galaxy[2]: /opt/freeware/bin/ansible-galaxy.orig: not found.
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13>
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> ls -rlt /opt/freeware/bin/ansible
-rwxr-xr-x 1 root system 64 Dec 22 01:37AM /opt/freeware/bin/ansible*
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> ls -rlt /opt/freeware/bin/ansible.orig
-rwxr-xr-x 1 root system 990 Dec 22 01:37AM /opt/freeware/bin/ansible.orig*
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> cat /opt/freeware/bin/ansible
#!/bin/sh
LANG=en_US.UTF-8 /opt/freeware/bin/ansible.orig "$@"
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13>
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13> cat /opt/freeware/bin/ansible.orig
#!/opt/freeware/bin/python3.9
# EASY-INSTALL-ENTRY-SCRIPT: 'ansible-core==2.14.13','console_scripts','ansible'
import re
import sys
# for compatibility with easy_install; see #2198
__requires__ = 'ansible-core==2.14.13'
try:
from importlib.metadata import distribution
except ImportError:
try:
from importlib_metadata import distribution
except ImportError:
from pkg_resources import load_entry_point
def importlib_load_entry_point(spec, group, name):
dist_name, _, _ = spec.partition('==')
matches = (
entry_point
for entry_point in distribution(dist_name).entry_points
if entry_point.group == group and entry_point.name == name
)
return next(matches).load()
globals().setdefault('load_entry_point', importlib_load_entry_point)
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
sys.exit(load_entry_point('ansible-core==2.14.13', 'console_scripts', 'ansible')())
root@efsnim-p1:/source/CK-AIX7.1-Ansible-2.14.13>
Please advice how to fix issue about the "ansible --version" and "ansible-galaxy --version" errors.
Regards,
Charin Kumjudpai.
------------------------------
CHARIN KUMJUDPAI
------------------------------