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)
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值