linux - 免root升级glibc

标签 linux python-3.x tensorflow centos virtualenv

我一直在尝试让 tensorflow 在我大学的集群上运行,但没有取得太大成功。我推测集群正在运行 CentOS 6,但我猜某些部分正在运行 CentOS 7。

由于权限问题,我在安装 python 包时遇到了很多麻烦。我能够通过使用 virtualenv 来解决这个问题,结果证明它非常适合我想做的事情。

现在,我已经安装了 tensorflow 。但是,当我尝试将其导入 python 时,出现错误:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ugrad/marsden/virt_env/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/home/ugrad/marsden/virt_env/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/ugrad/marsden/virt_env/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/ugrad/marsden/virt_env/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/ugrad/marsden/virt_env/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/ugrad/marsden/virt_env/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/ugrad/marsden/virt_env/tensorflow/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)

从最后一行,我推测 CentOS 的 GLIBC 版本太旧了。 stack exchange 上有很多关于升级 GLIBC 的内容,但我们再次遇到权限问题。

我想要的是在单独的目录中安装或编译 GLIBC 的升级版本,然后能够在我的虚拟环境中使用它。这可能吗?如果可以,我需要做什么?

如果我的问题没有意义或需要更多详细信息,请告诉我。

最佳答案

tensorflow 确实以 docker 镜像的形式存在。大学允许你使用docker吗? - 如果是这样,那么这将是最简单的解决方案。

如果您不能使用 docker 镜像,我会考虑虚拟化,如果那不是一个选项,我会考虑创建一个 chroot 环境或使用环境模块来指示操作系统从正确的位置读取 glibc。您应该能够使用 --prefix=/your/home/directory 编译 glibc,但您可能必须先编译一些依赖项。

关于linux - 免root升级glibc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45393352/

相关文章:

python - 如何从 .pb 转换为 .tflite?

linux - `tcpdump` 显示相同 ARP 数据包的不同长度

c - kprintf 打印出正楷

linux - 如何将 SocketCAN 配置到特定接口(interface)?

python - Keras - 如何使用 2 个独立的全连接层共享 CNN 的卷积部分

graph - tensorflow : how to insert custom input to existing graph?

c - shell 中的输出重定向如何适用于 Linux 中 C 中的 fork() 生成的子进程?

mysql - Airflow:如何在多个数据库上运行相同的查询

python 3 : `netloc` value in `urllib.parse` is empty if URL doesn't have `//`

python - selenium 和 python3 : selecting search box on www. rottentomatoes.com