Libavcodec.so.58: cannot open shared object file: No such file or directory

I have installed desktop version V190830 image on VIM3.
According to NPU Demo and source code and Simple NPU demo on VIM3 Ubuntu Bionic, I got correct result of inceptionv3:

root@Khadas:~/aml_npu_demo_binaries/inceptionv3/VIM3# ./run.sh 
Create Neural Network: 254ms or 254658us
Verify...
Verify Graph: 8ms or 8634us
Start run graph [1] times...
Run the 1 time: 22ms or 22115us
vxProcessGraph execution time:
Total   22ms or 22155us
Average 22.16ms or 22155.00us
 --- Top5 ---
  2: 0.844238
795: 0.007973
974: 0.003458
408: 0.002039
393: 0.001868

When I test Yolov3, there is an error:

root@Khadas:~/aml_npu_demo_binaries/detect_demo_picture# ./detect_demo_fb 0 1080p.bmp 
./detect_demo_fb: error while loading shared libraries: libavcodec.so.58: cannot open shared object file: No such file or directory

This is the info of ldd:

root@Khadas:~/aml_npu_demo_binaries/detect_demo_picture# ldd detect_demo_fb 
./detect_demo_fb: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/libopencv_imgproc.so.3.4)
./detect_demo_fb: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/libopencv_core.so.3.4)
./detect_demo_fb: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/libopencv_core.so.3.4)
./detect_demo_fb: /usr/lib/aarch64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/libopencv_videoio.so.3.4)
./detect_demo_fb: /lib/aarch64-linux-gnu/libm.so.6: version `GLIBC_2.29' not found (required by /usr/lib/libopencv_imgcodecs.so.3.4)
	libavcodec.so.58 => not found
	libavformat.so.58 => not found
	libavutil.so.56 => not found
	libswscale.so.5 => not found

I can find libavcodec.so.57 and libavcodec.so.53 on vim3:

root@Khadas:~/aml_npu_demo_binaries/detect_demo_picture# locate avcodec
/usr/lib/libavcodec.so
/usr/lib/libavcodec.so.53
/usr/lib/libavcodec.so.53.7.0
/usr/lib/aarch64-linux-gnu/libavcodec.so.57
/usr/lib/aarch64-linux-gnu/libavcodec.so.57.107.100

How to solve the problem? Do I need to flash a newer image?

yes, please try a newer image, and see if the problem still persists…

Note the latest Ubuntu …

https://dl.khadas.com/Firmware/VIM3/Ubuntu/

1 Like