This is very nice to have, because on some systems, /tmp is mounted with noexec and running the miniconda installer from it errors out with something like:
TASK [ansible-miniconda : installing....] *****************************************************************
fatal: [18.207.199.152]: FAILED! => {"changed": true, "cmd": [
"bash", "/tmp/Miniconda3-py39_4.10.3-Linux-x86_64.sh", "-b",
"-p", "/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64"], "delta": "0:00:01.159150",
"end": "2022-04-21 19:09:05.179247", "msg": "non-zero return code", "rc": 1,
"start": "2022-04-21 19:09:04.020097",
"stderr": "/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64/conda.exe: error while loading shared libraries:
libz.so.1: failed to map segment from shared object: Operation not permitted\n
/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64/conda.exe: error while loading shared libraries:
libz.so.1: failed to map segment from shared object: Operation not permitted",
"stderr_lines": [
"/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64/conda.exe: error while loading shared libraries:
libz.so.1: failed to map segment from shared object: Operation not permitted",
"/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64/conda.exe: error while loading shared libraries:
libz.so.1: failed to map segment from shared object: Operation not permitted"],
"stdout": "PREFIX=/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64\nUnpacking payload ...",
"stdout_lines": ["PREFIX=/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64", "Unpacking payload ..."]}
/usr/local/Miniconda3-py39_4.10.3-Linux-x86_64/conda.exe:
error while loading shared libraries: libz.so.1: failed to map segment from shared object:
Operation not permitted
This is very nice to have, because on some systems,
/tmp
is mounted withnoexec
and running the miniconda installer from it errors out with something like:The solution is to allow using a different
TMPDIR
as described at https://stackoverflow.com/questions/60106630/conda-exe-error-while-loading-shared-libraries-libz-so-1Without this, I get errors like the above while trying to provision an Amazon Linux EC2 instance. With this, I can put this in my playbook:
and it works.