Linux安裝啓動paraView遇到‘ error while loading shared libraries’,加載共享庫時出錯排查實錄

paraView版本:5.8.0

今天下載了paraView。paraView官網下載地址paraView下載版本
解壓後進入bin目錄,執行啓動命令

$ ./pvpython ../share/paraview-5.8/web/visualizer/server/pvw-visualizer.py --content ../share/paraview-5.8/web/visualizer/www --data ../share/paraview-5.8/data --port 8002

遇到了幾次共享庫加載錯誤的問題,記錄一下。

1.找不到libGL.so.1

找不到libGL.so.1
使用locate命令查找一下該庫文件的絕對路徑

$ locate -b 'libGL.so.1'

如果沒安裝locate命令,yum安裝一下

$ yum install mlocate

安裝後更新數據庫

$ updatedb

可以看到,庫文件是有的
能找到libGL
然後,在/etc/ld.so.conf.d/目錄下新建一文件,名字自行決定,這裏使用paraView-Python3.7-x86_64.conf。添加庫文件所在的目錄到文件中:

/var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/lib/mesa

執行ldconfig命令,更新一下動態庫的運行時綁定:

$ ldconfig

2.找不到libGLU.so.1

再次執行原命令,報錯找不到libGLU.so.1

$ ./pvpython ../share/paraview-5.8/web/visualizer/server/pvw-visualizer.py --content ../share/paraview-5.8/web/visualizer/www --data ../share/paraview-5.8/data --port 8002
./pvpython: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory

locate一下,沒找到,這個真沒有,安裝吧。網上大都是ubuntu的安裝,不太一樣,linux的yum安裝用以下命令即可:

yum install libGLU

3.找不到libXt.so.6

再次執行原命令,報錯找不到libXt.so.6(心態漸漸不穩)

$ ./pvpython ../share/paraview-5.8/web/visualizer/server/pvw-visualizer.py --content ../share/paraview-5.8/web/visualizer/www --data ../share/paraview-5.8/data --port 8002
./pvpython: error while loading shared libraries: libXt.so.6: cannot open shared object file: No such file or directory

網上找不到庫文件安裝命令,誤打誤撞試出來的

yum install libXt

結果

再試一次,不缺庫文件啦,也沒跑起來,沒找到解決辦法,心態崩了,先放着吧,以後找到解決方法再更。

$ ./pvpython ../share/paraview-5.8/web/visualizer/server/pvw-visualizer.py --content ../share/paraview-5.8/web/visualizer/www --data ../share/paraview-5.8/data --port 8002
(   4.253s) [main thread     ]vtkXOpenGLRenderWindow.:239    ERR| vtkXOpenGLRenderWindow (0x53d0da0): bad X server connection. DISPLAY=

Loguru caught a signal: SIGABRT
Stack trace:
61            0x401ecd ./pvpython() [0x401ecd]
60      0x7f3374d31445 __libc_start_main + 245
59            0x402418 ./pvpython() [0x402418]
58      0x7f33729b4d14 vtkPythonInterpreter::PyMain(int, char**) + 756
57      0x7f336fbd4af3 Py_Main + 35
56      0x7f336fbd48a7 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x1d78a7) [0x7f336fbd48a7]
55      0x7f336fbb2815 PyRun_SimpleFileExFlags + 229
54      0x7f336fbb26a2 PyRun_FileExFlags + 178
53      0x7f336fb7eb5b PyEval_EvalCode + 27
52      0x7f336fb7eb2e PyEval_EvalCodeEx + 62
51      0x7f336fb7e9fc _PyEval_EvalCodeWithName + 2780
50      0x7f336fa6e7e2 _PyEval_EvalFrameDefault + 33058
49      0x7f336fa95286 _PyFunction_FastCallKeywords + 166
48      0x7f336fb7e9fc _PyEval_EvalCodeWithName + 2780
47      0x7f336fa69c6f _PyEval_EvalFrameDefault + 13743
46      0x7f336fa95924 _PyObject_FastCallKeywords + 260
45      0x7f336fafb042 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0xfe042) [0x7f336fafb042]
44      0x7f336fb00609 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x103609) [0x7f336fb00609]
43      0x7f336fa9631d _PyObject_Call_Prepend + 189
42      0x7f336fa951c6 _PyFunction_FastCallDict + 678
41      0x7f336fa65610 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x68610) [0x7f336fa65610]
40      0x7f336fa6ef9c _PyEval_EvalFrameDefault + 35036
39      0x7f336fa65610 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x68610) [0x7f336fa65610]
38      0x7f336fa6ef9c _PyEval_EvalFrameDefault + 35036
37      0x7f336fa65610 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x68610) [0x7f336fa65610]
36      0x7f336fa6efec _PyEval_EvalFrameDefault + 35116
35      0x7f336fa65610 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x68610) [0x7f336fa65610]
34      0x7f336fa694a5 _PyEval_EvalFrameDefault + 11749
33      0x7f336fa95924 _PyObject_FastCallKeywords + 260
32      0x7f336fafb042 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0xfe042) [0x7f336fafb042]
31      0x7f336fb00609 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x103609) [0x7f336fb00609]
30      0x7f336fa9631d _PyObject_Call_Prepend + 189
29      0x7f336fa950d0 _PyFunction_FastCallDict + 432
28      0x7f336fb7e9fc _PyEval_EvalCodeWithName + 2780
27      0x7f336fa6ef9c _PyEval_EvalFrameDefault + 35036
26      0x7f336fa65610 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/bin/../lib/libpython3.7m.so.1.0(+0x68610) [0x7f336fa65610]
25      0x7f336fa6ef9c _PyEval_EvalFrameDefault + 35036
24      0x7f336fa95286 _PyFunction_FastCallKeywords + 166
23      0x7f336fb7e9fc _PyEval_EvalCodeWithName + 2780
22      0x7f336fa6dfa9 _PyEval_EvalFrameDefault + 30953
21      0x7f336fa973aa PyCFunction_Call + 154
20      0x7f33215bf331 /var/www/ParaView-5.8.0-MPI-Linux-Python3.7-64bit/lib/python3.7/site-packages/paraview/modules/vtkRemotingViews.so(+0x16e331) [0x7f33215bf331]
19      0x7f336adf3668 vtkSMViewProxy::StillRender() + 328
18      0x7f337340cb35 vtkPVSessionBase::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) + 53
17      0x7f337340da7b vtkPVSessionCore::ExecuteStream(unsigned int, vtkClientServerStream const&, bool) + 59
16      0x7f337340dc45 vtkPVSessionCore::ExecuteStreamInternal(vtkClientServerStream const&, bool) + 245
15      0x7f337277fdcd vtkClientServerInterpreter::ProcessStream(vtkClientServerStream const&) + 29
14      0x7f337277fa9e vtkClientServerInterpreter::ProcessOneMessage(vtkClientServerStream const&, int) + 1198
13      0x7f337277efda vtkClientServerInterpreter::ProcessCommandInvoke(vtkClientServerStream const&, int) + 330
12      0x7f337277ece5 vtkClientServerInterpreter::CallCommandFunction(char const*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&) + 325
11      0x7f3373d5c750 vtkPVRenderViewCommand(vtkClientServerInterpreter*, vtkObjectBase*, char const*, vtkClientServerStream const&, vtkClientServerStream&, void*) + 7456
10      0x7f336ad5e8bf vtkPVRenderView::StillRender() + 95
9       0x7f336ad69727 vtkPVRenderView::Render(bool, bool) + 1623
8       0x7f335bfc5530 vtkXOpenGLRenderWindow::Render() + 32
7       0x7f335bf2204d vtkOpenGLRenderWindow::Render() + 13
6       0x7f33573ae4b7 vtkRenderWindow::Render() + 167
5       0x7f335bfbe32d vtkXRenderWindowInteractor::Initialize() + 573
4       0x7f335bfbff4c vtkXOpenGLRenderWindow::GetDesiredDepth() + 12
3       0x7f335bfc3cf6 vtkXOpenGLRenderWindow::GetDesiredVisualInfo() + 774
2       0x7f3374d46968 abort + 328
1       0x7f3374d45277 gsignal + 55
0       0x7f3374d452f0 /lib64/libc.so.6(+0x362f0) [0x7f3374d452f0]
(   4.253s) [main thread     ]                       :0     FATL| Signal: SIGABRT
Aborted (core dumped)
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章