libopencv_core.so.2.4: cannot open shared object file: Depends: libopencv-photo2.4v5

1. 问题现象

在使用 ffmpeg 报错误如下:

ffmpeg: error while loading shared libraries: libopencv_core.so.2.4: 
cannot open shared object file: No such file or directory

按照网上说的方法发现,在 /usr/local/lib 目录下并没有 libopencv_ 开头

wohu@ubuntu:/usr/local/lib$ ls
libcublas.so.8.0  libcudnn.so.6     python2.7
libcudart.so.8.0  libcurand.so.8.0  python3.5

2. 解决方法

使用 apt-get 命令安装 python-opencv

sudo apt-get install python-opencv

出现依赖错误:

The following packages have unmet dependencies:
 python-opencv : Depends: libopencv-photo2.4v5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

换一种方法使用 aptitude 安装,问题得以解决:

sudo aptitude install python-opencv
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
This error typically occurs when the system is unable to locate the required shared library file, "libOpenGL.so.0". Here are a few steps you can take to resolve this issue: 1. Verify that the library is installed: Check if the library is installed on your system by running the following command: ``` ldconfig -p | grep libOpenGL ``` If the library is not listed, you will need to install it. 2. Install the library: Use your package manager (e.g., `apt-get`, `yum`, `dnf`, etc.) to install the library. The package name may vary depending on your Linux distribution. For example, on Ubuntu, you can run: ``` sudo apt-get install libopengl0 ``` 3. Update library cache: After installing the library, you may need to update the library cache. Run the following command: ``` sudo ldconfig ``` 4. Check library paths: Ensure that the library path is correctly set in the environment variable `LD_LIBRARY_PATH`. You can check its value by running: ``` echo $LD_LIBRARY_PATH ``` If it is not set or does not include the directory containing "libOpenGL.so.0", you can add it using the following command: ``` export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/library ``` Replace `/path/to/library` with the actual path to the directory containing the library. 5. Restart the application: If you were trying to run an application that depends on the library, restart the application after performing the above steps. By following these steps, you should be able to resolve the shared object file error related to "libOpenGL.so.0." Let me know if you have any further questions!

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值