7

Unable to install Anaconda3-2019.10-Linux-x86_64 in my RHEL machine; Getting the error -> conda.exe: error while loading shared libraries: libz.so.1: failed to map segment from shared object: Operation not permitted.

Anaconda or Miniconda version: Anaconda3-2019.10-Linux-x86_64 Operating System:"Red Hat Enterprise Linux Server" VERSION="7.7 (Maipo)"

Steps to Reproduce

wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh bash ./Anaconda3-2019.10-Linux-x86_64.sh

I've followed the resolution steps mentioned in Github #11493, and #11154 by @davidlowryduda, @Pastthesun, but that doesn't fix my issue. Have posted the issue in Github as #11587.

I tried with older version of Anaconda --> Anaconda3-2019.07-Linux-x86_64 and Anaconda3-2019.03-Linux-x86_64. Anaconda3-2019.07-Linux-x86_64 did not give the same issue related to libz.so.1, but gave another error. But I had a smooth installation with Anaconda3-2019.03-Linux-x86_64.

bkrishna2006
  • 59
  • 1
  • 14

2 Answers2

15

The problem may be your /tmp is set to noexec in /etc/fstab. Verify with grep tmp /etc/fstab.

Run the installer with TMPDIR set to a directory you have write permissions to, on a file system with executable permission. i.e.:

mkdir /users/$USER/tmpconda
TMPDIR=/users/$USER/tmpconda bash Miniconda2-latest-Linux-x86_64.sh

Solution was found at Anaconda Issues 11587

A quick test of executability on a file system:

$ touch foo && chmod +x foo && ./foo
-bash: ./foo: Permission denied

noexec will cause "Permission denied" even if x is set on the file.

plswork04
  • 310
  • 3
  • 7
zerocog
  • 1,227
  • 15
  • 25
  • Ok; I didn't get a chance to try out the TMPDIR option; but since this is reported as having worked for many, marking this issue as closed. Thanks all for the response @zerocog, I accept your response as the answer ! – bkrishna2006 May 28 '20 at 06:26
  • My system IT with root access has been installing the Anaconda with the TMPDIR set to an exec capable directory. Therefore, it is working outside the the user local install. – zerocog May 29 '20 at 18:50
  • 1
    This worked for me. Note that you should not name the directory "TMPDIR" or it will collide with the `TMPDIR` environment variable. – Wassadamo Jul 29 '20 at 20:47
  • Most will not have the problem, and is only a problem for those that have a system environment locked down to not allow exec in the /tmp dir. Yes, you are changing the path of TMPDIR env to intentionally go to a place that will process exec. You do not need to permanently change the PATH, just for the install. – zerocog Jul 30 '20 at 21:17
  • You can also remount `/tmp` with executable permissions with `sudo mount /tmp -o remount,exec` and if write permissions are also necessary, use `sudo mount /tmp -o remount,rw` as well. –  Oct 10 '20 at 08:49
0

I faced similar issue in Debian 10 and fixed the issue by exporting a writeable path to TMP environment variable.

Reference: https://github.com/ContinuumIO/anaconda-issues/issues/11154

VargheseJ
  • 23
  • 5