如何在Jetson TX1上更新协议缓冲区运行时库?

时间:2018-07-26 13:48:13

标签: tensorflow ubuntu-16.04 object-detection-api nvidia-jetson protobuf-3

我正在尝试获取TensorFlow Object Detection API来训练Mask RCNN模型。 由于我使用的是Nvidia Jetson TX1,因此我使用此github repo上的预制轮子安装了TensorFlow 1.4。

尝试运行时

cd <tensorflow>/models/research

python object_detection/model_main.py \
    --pipeline_config_path=${PIPELINE_CONFIG_PATH} \
    --model_dir=${MODEL_DIR} \
    --num_train_steps=${NUM_TRAIN_STEPS} \
    --num_eval_steps=${NUM_EVAL_STEPS} \
    --alsologtostderr      

我遇到以下错误:

[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'

它告诉我更新protobuf库,但是我不知道如何执行该操作,因为我已经尝试安装最新版本(请参见下文)。实际上,我什至不知道到底是谁引发了此错误。 希望有人可以帮助我。预先感谢!

我在official tutorial之后安装了对象检测API,特别是通过以下方式安装了protobuf的较新版本:

# remove old version
sudo apt purge protobuf-compiler

# download prebuilt protoc
cd ~/protobuf
wget https://github.com/google/protobuf/releases/download/v3.6.0/protoc-3.6.0-linux-aarch_64.zip
unzip protobuf-python*.zip
export PATH=$PATH:~/protobuf/bin

我认为此安装有效,因为我得到了所需的输出:

$ protoc --version
libprotoc 3.6.0

$ which protoc
/home/<username>/protobuf/bin/protoc

但是如果我输入

$ sudo find . -name "*libprotobuf*"
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.so.9.0.1
/usr/lib/aarch64-linux-gnu/libprotobuf.so.9
/usr/lib/aarch64-linux-gnu/libprotobuf.so.9.0.1
/usr/lib/aarch64-linux-gnu/libprotobuf-lite.so.9

apt安装了某些东西。不确定是否与错误有关。

运行:

  • Ubuntu 16.04
  • Python 3.5
  • TensorFlow 1.4

0 个答案:

没有答案