erro de protobuf no ubuntu 16 usando o tensorflow

0
n@rjn-Oryx-Pro:~$ python

Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import tensorflow

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.4.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "external/protobuf_archive/src/google/protobuf/any.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  This program requires version 3.4.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "external/protobuf_archive/src/google/protobuf/any.pb.cc".)
Aborted (core dumped)

NOTA:

rjn@rjn-Oryx-Pro:~$ pip2 show protobuf

Name: protobuf
Version: 3.5.2.post1
Summary: Protocol Buffers
Home-page: https://developers.google.com/protocol-buffers/
Author: [email protected]
Author-email: [email protected]
License: 3-Clause BSD License
Location: /usr/local/lib/python2.7/dist-packages
Requires: setuptools, six
Required-by: tensorflow, tensorflow-tensorboard, tensorflow-gpu

NOTA:

sudo find .. / -name libprotobuf*

/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9.0.1
/usr/lib/paraview/libprotobuf.so

NOTA:

Eu segui todas as instruções para instalar o protobuf manualmente a partir do site da Protobuf. Copiando para / usr / local como indicado, mas isso não resolve o problema.

Eu também tentei compilar a partir da fonte, mas fazer a verificação falhar com o mesmo erro.

make check

[libprotobuf FATAL google/protobuf/stubs/common.cc:61] This program requires version 3.5.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/any.pb.cc".)
terminate called after throwing an instance of 'google::protobuf::FatalException'
  what():  This program requires version 3.5.0 of the Protocol Buffer runtime library, but the installed version is 2.6.1.  Please update your library.  If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library.  (Version verification failed in "google/protobuf/any.pb.cc".)

Eu tentei desinstalar tensorflow e protobuf em todo lugar usando pip e apt-get e o erro de reinstalação, mas ainda assim mesmo.

Eu não vi esse erro antes e parece que muitas pessoas estão conseguindo, mas nenhuma das soluções parece funcionar.

Escaneando por protobuf no meu sistema, mostre-o em: Eu não quero deletá-lo, pois temo quebrar o Ubuntu. Minha versão é Ubuntu 16.04

/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9.0.1
/usr/lib/paraview/libprotobuf.so
    
por Richard Nunziata 28.04.2018 / 22:15

1 resposta

0

Acabei de ter o mesmo problema:

Acontece que LD_PRELOAD continha /usr/lib/x86_64-linux-gnu/libprotobuf.so.9 , o que confundiu python. Depois de removê-lo no meu .bashrc , o problema foi resolvido.

    
por Felice 23.05.2018 / 20:11