conda.exe:加载共享库时出错:libz.so.1

conda.exe: error while loading shared libraries: libz.so.1

无法在我的 RHEL 机器上安装 Anaconda3-2019。10-Linux-x86_64;获取错误 -> conda.exe:加载共享库时出错:libz.so.1:无法从共享对象映射段:不允许操作。

Anaconda 或 Miniconda 版本:Anaconda3-2019.10-Linux-x86_64 操作系统:"Red Hat Enterprise Linux Server" VERSION="7.7 (Maipo)"

重现步骤

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

我已经按照@davidlowryduda、@Pastthesun 在Github#11493 和#11154 中提到的解决步骤进行操作,但这并不能解决我的问题。已将问题发布在 Github 中作为 #11587。

我尝试使用旧版本的 Anaconda --> Anaconda3-2019.07-Linux-x86_64 和 Anaconda3-2019.03-Linux-x86_64。 Anaconda3-2019.07-Linux-x86_64没有给出与libz.so.1相关的相同问题,而是给出了另一个错误。但是我顺利安装了 Anaconda3-2019.03-Linux-x86_64.

我在 Debian 10 中遇到了类似的问题,并通过将可写路径导出到 TMP 环境变量解决了这个问题。

参考: https://github.com/ContinuumIO/anaconda-issues/issues/11154

问题可能是您的 /tmp/etc/fstab 中设置为 noexec。用 grep tmp /etc/fstab.

验证

运行 安装程序 TMPDIR 设置为您在具有可执行权限的文件系统上具有写入权限的目录。即:

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

Anaconda Issues 11587

处找到了解决方案

文件系统可执行性的快速测试:

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

noexec 将导致“权限被拒绝”,即使在文件上设置了 x

我是这样解决的: -- 运行 命令 >>>

mount |grep tmp

检查不包含属性的 tmp 分区:noexec 并且包含属性:rw

就我而言:

devtmpfs on /dev type devtmpfs
(rw,nosuid,seclabel,size=3775584k,nr_inodes=943896,mode=755)

运行 在终端中:

export TMP='path/to/tmp'& export TMPDIR='path/to/tmp'& bash Anaconda_install_file.sh