首次apt安装ffmpeg出现symbol lookup error

问题描述:

ffmpeg:symbol lookup error:ffmpeg:undefined symol:...

使用ldd查看动态链接库

ldd /usr/bin/ffmpeg

一般情况下为

动态链接库=>/lib/x86_64-linux-gnu/动态链接库名

如果路径不一致则可以定位到问题来源

解决方案:

输入

export LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH

这条命令会把 /usr/lib/x86_64-linux-gnu 目录添加到当前 LD_LIBRARY_PATH 变量的开头,然后跟上原来的 LD_LIBRARY_PATH 值。这意味着动态链接器将会首先在这个目录中查找库文件,之后再查找其它目录中的库文件。

问题解决。

如果想每次打开终端时不用再次输入

nano ~/.bashrc

可以在bashrc中加入一行

export LD_LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH"

ma@ubuntu:~/Downloads/torchvision$ python3 setup.py install setup.py:10: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html from pkg_resources import DistributionNotFound, get_distribution, parse_version Building wheel torchvision-0.15.1 Compiling extensions with following flags: FORCE_CUDA: False DEBUG: False TORCHVISION_USE_PNG: True TORCHVISION_USE_JPEG: True TORCHVISION_USE_NVJPEG: True TORCHVISION_USE_FFMPEG: True TORCHVISION_USE_VIDEO_CODEC: True NVCC_FLAGS: Found PNG library Building torchvision with PNG image support libpng version: 1.6.37 libpng include path: /usr/include/libpng16 Running build on conda-build: False Running build on conda: False Building torchvision with JPEG image support Building torchvision without NVJPEG image support ffmpeg: symbol lookup error: ffmpeg: undefined symbol: avio_protocol_get_class, version LIBAVFORMAT_58 Building torchvision without ffmpeg support Error fetching ffmpeg version, ignoring ffmpeg. Building torchvision without ffmpeg support Building torchvision without video codec support running install /home/ma/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` directly. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. ******************************************************************************** !! self.initialize_options() /home/ma/.local/lib/python3.8/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated. !! ******************************************************************************** Please avoid running ``setup.py`` and ``easy_install``. Instead, use pypa/build, pypa/installer or other standards-based tools. See https://github.com/pypa/setuptools/issues/917 for details. ******************************************************************************** !! self.initialize_options() error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/usr/lib/python3.8/site-packages' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /usr/lib/python3.8/site-packages/ This directory does not currently exist. Please create it and try again, or choose a different installation directory (using the -d or --install-dir option).
最新发布
06-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值