Ask Your Question
0

ImportError: /lib64/libavcodec.so.54: symbol avpriv_update_lls, version LIBAVUTIL_52 not defined in file libavutil.so.52 with link time reference

asked 2013-08-08 14:13:17 -0600

Loknar gravatar image

updated 2013-08-09 03:57:07 -0600

I have installed OpenCV on Fedora 17, and it gives me this error after i try to import cv2 in Python:

Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information.

>>> import cv2
Traceback (most recent call last): File "<stdin>", line 1, in <module>
ImportError: /lib64/libavcodec.so.54: symbol avpriv_update_lls, version LIBAVUTIL_52 not defined in file libavutil.so.52 with link time reference

What this can be about? i installed ffmpeg-devel

ffmpeg version N-55387-ge1a5ee2 Copyright (c) 2000-2013 the FFmpeg developers
built on Aug  8 2013 17:48:16 with gcc 4.7.2 (GCC) 20120921 (Red Hat 4.7.2-2)
  configuration: --enable-shared
  libavutil      52. 41.100 / 52. 41.100
  libavcodec     55. 24.100 / 55. 24.100
  libavformat    55. 13.102 / 55. 13.102
  libavdevice    55.  3.100 / 55.  3.100
  libavfilter     3. 82.100 /  3. 82.100
  libswscale      2.  4.100 /  2.  4.100
  libswresample   0. 17.103 /  0. 17.103
edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
1

answered 2013-10-11 02:38:13 -0600

kazeka gravatar image

You may have conflicting versions of libav* on your system. I had the same problem and then followed instructions at http://juliensimon.blogspot.fr/2013/08/howto-compiling-ffmpeg-x264-mp3-aac.html to get rid of them.

edit flag offensive delete link more
0

answered 2019-05-30 03:29:57 -0600

ifcoxs gravatar image

I have encountered the same problem:

>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /usr/lib/x86_64-linux-gnu/libavcodec.so.57: symbol avpriv_slicethread_free version LIBAVUTIL_55 not defined in file libavutil.so.55 with link time reference

I use the command:locate

Lenovo:/usr/lib/x86_64-linux-gnu$ locate libavutil.so.55

/data/pyenvs/bob_py3/lib/libavutil.so.55
/data/pyenvs/bob_py3/lib/libavutil.so.55.78.100
/opt/kingsoft/wps-office/office6/libavutil.so.55
/opt/kingsoft/wps-office/office6/libavutil.so.55.17.103
/usr/lib/x86_64-linux-gnu/libavutil.so.55
/usr/lib/x86_64-linux-gnu/libavutil.so.55.58.100

and then I copy the file (/data/pyenvs/bob_py3/lib/libavutil.so.55.78.100) to the path (/usr/lib/x86_64-linux-gnu/libavutil.so.55.58.100). Relink the file.

Lenovo:/usr/lib/x86_64-linux-gnu$ sudo cp /data/pyenvs/bob_py3/lib/libavutil.so.55.78.100 .

Lenovo:/usr/lib/x86_64-linux-gnu$ sudo ln -s libavutil.so.55.78.100 libavutil.so.55

It work.

Python 3.5.5 |Anaconda, Inc.| (default, May 13 2018, 21:12:35) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import cv2
>>> print(cv2.__version__)
3.2.0
>>>
edit flag offensive delete link more

Question Tools

Stats

Asked: 2013-08-08 14:13:17 -0600

Seen: 5,275 times

Last updated: Oct 11 '13