我正在使用名为 OpenFOAM (v5.0) 的流体模拟软件,该软件使用 ParaView 5.4.0。我收到有关 libprotobuf 的错误(见下文)。我怀疑这可能与安装的旧版 OpenFOAM 有关,但我不确定具体要更改什么。
paraFOAM
在模拟案例目录中运行产生的错误完整上下文:
trent@Tars:~/OpenFOAM/trent-5.0/run/channelCoarse$ paraFoam
Created temporary 'channelCoarse.OpenFOAM'
libprotobuf FATAL /home/trent/OpenFOAM/ThirdParty-5.0/ParaView-5.4.0/ThirdParty/
protobuf/vtkprotobuf/src/google/protobuf/stubs/common.cc:62] This program requires
version 2.6.0 of the Protocol Buffer runtime library, but the installed version is
2.3.0. 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 "/build/mir-ui6vjS/mir-0.26.3+16.04
.20170605/obj-x86_64-linux-gnu/src/protobuf/mir_protobuf.pb.cc".)
Aborted (core dumped)
这让我相信我需要更新我的 libprotobuf;但是,这里是输出dpkg -l | grep libprotobuf
:
ii libprotobuf-java 2.6.1-1.3 all Java bindings for protocol buffers
ii libprotobuf-lite9v5:amd64 2.6.1-1.3 amd64 protocol buffers C++ library (lite version)
ii libprotobuf9v5:amd64 2.6.1-1.3 amd64 protocol buffers C++ library
为了便于衡量,下面是输出locate libprotobuf
:
/home/trent/OpenFOAM/ThirdParty-4.1/build/linux64Gcc/ParaView-5.0.1/lib/libprotobuf-lite.so
/home/trent/OpenFOAM/ThirdParty-4.1/build/linux64Gcc/ParaView-5.0.1/lib/libprotobuf.so
/home/trent/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/ParaView-5.0.1/lib/paraview-5.0/libprotobuf-lite.so
/home/trent/OpenFOAM/ThirdParty-4.1/platforms/linux64Gcc/ParaView-5.0.1/lib/paraview-5.0/libprotobuf.so
/home/trent/OpenFOAM/ThirdParty-5.0/build/linux64Gcc/ParaView-5.4.0/lib/libprotobuf-lite.so
/home/trent/OpenFOAM/ThirdParty-5.0/build/linux64Gcc/ParaView-5.4.0/lib/libprotobuf.so
/home/trent/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc/ParaView-5.4.0/lib/paraview-5.4/libprotobuf-lite.so
/home/trent/OpenFOAM/ThirdParty-5.0/platforms/linux64Gcc/ParaView-5.4.0/lib/paraview-5.4/libprotobuf.so
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9
/usr/lib/x86_64-linux-gnu/libprotobuf-lite.so.9.0.1
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9
/usr/lib/x86_64-linux-gnu/libprotobuf.so.9.0.1
/usr/local/MATLAB/R2016a/bin/glnxa64/libprotobuf.so.8
/usr/local/MATLAB/R2016a/bin/glnxa64/libprotobuf.so.8.0.0
/usr/share/doc/libprotobuf-java
/usr/share/doc/libprotobuf-lite9v5
/usr/share/doc/libprotobuf9v5
/usr/share/doc/libprotobuf-java/changelog.Debian.gz
/usr/share/doc/libprotobuf-java/copyright
/usr/share/doc/libprotobuf-lite9v5/changelog.Debian.gz
/usr/share/doc/libprotobuf-lite9v5/copyright
/usr/share/doc/libprotobuf9v5/changelog.Debian.gz
/usr/share/doc/libprotobuf9v5/copyright
/var/lib/dpkg/info/libprotobuf-java.list
/var/lib/dpkg/info/libprotobuf-java.md5sums
/var/lib/dpkg/info/libprotobuf-lite9v5:amd64.list
/var/lib/dpkg/info/libprotobuf-lite9v5:amd64.md5sums
/var/lib/dpkg/info/libprotobuf-lite9v5:amd64.shlibs
/var/lib/dpkg/info/libprotobuf-lite9v5:amd64.triggers
/var/lib/dpkg/info/libprotobuf9v5:amd64.list
/var/lib/dpkg/info/libprotobuf9v5:amd64.md5sums
/var/lib/dpkg/info/libprotobuf9v5:amd64.shlibs
/var/lib/dpkg/info/libprotobuf9v5:amd64.triggers
几点说明:我之前从源代码安装时遇到过与 Qt5 相关的构建问题,但这些问题已通过执行步骤解决,具体步骤可参见这里。今天早些时候,我通过将导出的变量添加到 /etc/profile.d 目录中的文件中,使这些更改永久生效。此外,虽然我怀疑它与此问题有任何关系,但我将 /usr/bin/ 目录中的 qmake 符号链接(链接到 /usr/bin/qtchooser/)替换为链接到 $HOME 中 Qt5.6 目录的符号链接。
希望您能幫忙,謝謝!