【问题标题】:Installing Software in Linux Ubuntu - shotdetect for detecting video shots在 Linux Ubuntu 中安装软件 - shotdetect 用于检测视频镜头
【发布时间】:2012-04-05 09:28:33
【问题描述】:

我在安装 shotdetect 软件时遇到了很多错误。一些错误是由于依赖关系而得到解决的。它能够配置完美但“make”,即运行make文件会抛出这个错误。 错误:ffmpeg/avcodec.h 没有这样的文件或目录 ffmpeg/avformat.h 没有这样的文件或目录

可能是因为 ffmpeg 或 shotdetect 软件版本不同。我尝试重新安装最新的(和旧的 ffmpeg)但无法在我的 /usr/include/ 中找到 ffmpeg 文件夹,这就是为什么没有这样的文件“ffmpeg/avcodec.h”。 请帮忙。

【问题讨论】:

  • 运行这些命令时会发生什么?定位 avcodec.h 或定位 ffmpeg

标签: compiler-errors ffmpeg makefile ubuntu-10.04


【解决方案1】:

我得到了解决方案.. 我在 /usr/include/ 中创建了一个文件夹 ffmpeg,并将 /usr/include/libavcodec.. 中的所有文件都包含在 /usr/include/ffmpeg/.. 中。最后它正在工作。 以下步骤将有助于在 ubuntu 10.x 和 11.x 中安装软件

安装 ShotDetection 软件

  1. 安装依赖

    sudo apt-cache 搜索 gcc sudo aptitude install build-essential sudo apt-get install libxml2-dev libxslt-dev libavcodec-dev libavformat-dev libavformat-dev pacman libgd2-noxpm-dev libjpeg62-dev libtiff4-dev cmake libswscale-dev libjasper-dev

2.在/usr/include/下创建一个名为ffmpeg的文件夹,并复制必要的文件

cd /usr/include/
sudo mkdir ffmpeg  
sudo cp /usr/include/libavcodec/*  /usr/include/ffmpeg/
sudo cp /usr/include/libavformat/*  /usr/include/ffmpeg/
sudo cp /usr/include/libswscale/*  /usr/include/ffmpeg/

3.下载并安装shotdetect软件

    cd /var/www/

   wget http://shotdetect.nonutc.fr/releases/latest.tar.gz
   tar xvzf latest.tar.gz
   cd shotdetect-1.0.86
   ./configure
   make
   sudo make install

  1. 签入/usr/local/bin/shotdetect 可执行文件应该在那里。

【讨论】:

  • 你为什么在第二步做chmod -R ...0777 是什么意思?
  • 为什么在这里投反对票...这是shotdetect的完整证明解决方案。我需要 xplaination 进行 -tive 投票,否则我不信任 stackoverflow。
  • 不要执行 chmod 0777。它授予对 /usr/include/ 的完全访问权限,只需授予 /usr/include/ 足够的权限以复制文件夹。
  • 这很奇怪,你不需要做0777 来复制/usr/include/ 中的东西,我按照步骤2 没有给予太多关注,并错误地将0777 添加到我的所有文件中在/usr/include/ 中,最终搞砸了我的整个系统,并且花了很长时间才将/usr/include 中的所有内容恢复到以前的状态,这样做0777完全废话,而且你在做-R,这太可怕了。
  • 是的 sudo chmod -R 很危险。我同意,即使我现在意识到了。那时只是个新手。
猜你喜欢
  • 1970-01-01
  • 2012-11-19
  • 2017-01-26
  • 2018-02-07
  • 1970-01-01
  • 1970-01-01
  • 2020-05-31
  • 2023-03-20
  • 1970-01-01
相关资源
最近更新 更多