Command ansible-galaxy error during kickstart

Hi,

I’am trying on my %post to run ansible-galaxy but find it hard as it will drop this error:

/mnt/sysimage/bin/ansible-galaxy: /usr/bin/python3.9: bad interpreter: No such file or directory

On my package part have added python3 and this is appearing under

/mnt/sysimage/bin/python3.9

my guess for this error is that ansible-galaxy is looking for python and not finding it under /usr/bin

Don’t really know best solution for this. Came up with link the one from /mnt to /usr and solve this with by changing the interpreter… So i have now this:

%post --nochroot --interpreter=/mnt/sysimage/bin/python3.9 --log=/root/ansible-post.log

But it comes out now with another error:

/mnt/sysimage/bin/python3.9 error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory

Any solution for this?

1 Like

try to add

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8

before running ansible-galaxy collection install [xxx] command.

1 Like