在运行文件的时候出现Segmentation fault (core dumped)的错误
经过排查,在即使只有一句 import cv2的文件中运行也会产生这个错误
怀疑是因为opencv的原因
我的opencv的安装是参照https://pyimagesearch.com/2018/09/19/pip-install-opencv/
查找解决方法时,有人提议使用_LD_DEBUG=files python -c "import cv2"_来查看错误
但是我看不懂以下的输出。请问有无办法解决这个问题?
```c
2623:
2623: file=libc.so.6 [0]; needed by python [0]
2623: file=libc.so.6 [0]; generating link map
2623: dynamic: 0x00007f5fbf800b80 base: 0x00007f5fbf616000 size: 0x00000000001f14d8
2623: entry: 0x00007f5fbf63d1f0 phdr: 0x00007f5fbf616040 phnum: 14
2623:
2623:
2623: file=libpthread.so.0 [0]; needed by python [0]
2623: file=libpthread.so.0 [0]; generating link map
2623: dynamic: 0x00007f5fbf610d70 base: 0x00007f5fbf5f3000 size: 0x0000000000022478
2623: entry: 0x00007f5fbf5fb190 phdr: 0x00007f5fbf5f3040 phnum: 13
2623:
2623:
2623: file=libdl.so.2 [0]; needed by python [0]
2623: file=libdl.so.2 [0]; generating link map
2623: dynamic: 0x00007f5fbf5f1d90 base: 0x00007f5fbf5ed000 size: 0x0000000000005110
2623: entry: 0x00007f5fbf5ee220 phdr: 0x00007f5fbf5ed040 phnum: 11
2623:
2623:
2623: file=libutil.so.1 [0]; needed by python [0]
2623: file=libutil.so.1 [0]; generating link map
2623: dynamic: 0x00007f5fbf5ebdc8 base: 0x00007f5fbf5e8000 size: 0x0000000000004110
2623: entry: 0x00007f5fbf5e93e0 phdr: 0x00007f5fbf5e8040 phnum: 11
2623:
2623:
2623: file=libm.so.6 [0]; needed by python [0]
2623: file=libm.so.6 [0]; generating link map
2623: dynamic: 0x00007f5fbf5e6d90 base: 0x00007f5fbf499000 size: 0x000000000014e110
2623: entry: 0x00007f5fbf4a83c0 phdr: 0x00007f5fbf499040 phnum: 11
2623:
2623:
2623: file=libexpat.so.1 [0]; needed by python [0]
2623: file=libexpat.so.1 [0]; generating link map
2623: dynamic: 0x00007f5fbf497de0 base: 0x00007f5fbf46b000 size: 0x000000000002d0a0
2623: entry: 0x00007f5fbf46f230 phdr: 0x00007f5fbf46b040 phnum: 11
2623:
2623:
2623: file=libz.so.1 [0]; needed by python [0]
2623: file=libz.so.1 [0]; generating link map
2623: dynamic: 0x00007f5fbf467df0 base: 0x00007f5fbf44d000 size: 0x000000000001b0b8
2623: entry: 0x00007f5fbf44f280 phdr: 0x00007f5fbf44d040 phnum: 11
2623:
2623:
2623: calling init: /lib/x86_64-linux-gnu/libpthread.so.0
2623:
2623:
2623: calling init: /lib/x86_64-linux-gnu/libc.so.6
2623:
2623:
2623: calling init: /lib/x86_64-linux-gnu/libz.so.1
2623:
2623:
2623: calling init: /lib/x86_64-linux-gnu/libexpat.so.1
2623:
2623:
2623: calling init: /lib/x86_64-linux-gnu/libm.so.6
2623:
2623:
2623: calling init: /lib/x86_64-linux-gnu/libutil.so.1
2623:
2623:
2623: calling init: /lib/x86_64-linux-gnu/libdl.so.2
2623:
2623:
2623: initialize program: python
2623:
2623:
2623: transferring control: python
2623:
2623:
2623: file=/home/liangyz/.virtualenvs/cv/lib/python3.8/site-packages/cv2/cv2.abi3.so [0]; dynamically loaded by python [0]
2623: file=/home/liangyz/.virtualenvs/cv/lib/python3.8/site-packages/cv2/cv2.abi3.so [0]; generating link map
2623: dynamic: 0x00007f5fbe43d000 base: 0x00007f5fb9ad9000 size: 0x000000000496d990
2623: entry: 0x00007f5fb9cf5700 phdr: 0x00007f5fb9ad9040 phnum: 21
2623:
Segmentation fault (core dumped)
```