遵循安装说明后,无法加载本机张量流运行时



我正在尝试在Ubuntu上安装语法,我在此处遵循Ubuntu 16.10 二进制安装说明。当我运行最后一个命令时:

python -c 'import dragnn.python.load_dragnn_cc_impl, syntaxnet.load_parser_ops'

我在下面收到一条长的错误消息:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/dragnn/python/load_dragnn_cc_impl.py", line 19, in <module>
    import tensorflow as tf
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 51, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
Failed to load the native TensorFlow runtime.
See https://www.tensorflow.org/install/install_sources#common_installation_problems
for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

我检查了常见的安装问题页面,但似乎还没有解决此问题。是否有人在安装语法上有类似的问题?我真的很感谢您的帮助。

您需要安装最新的libstdc 6。

  1. 检查版本

    strings/usr/lib/x86_64-linux-gnu/libstdc so.6 |grep glibcxx

  2. 添加回购

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test

  3. 安装

    sudo apt-get更新 sudo apt-get dist升级#i我使用了此命令,我想以下命令也应起作用。

    sudo apt-get安装libstdc 6

我遵循以下操作:如何修复:/usr/lib/libstdc so.6:找不到版本`glibcxx_3.4.15'找不到。

最新更新