“构建”另一个包是什么意思?

问题描述 投票:0回答:0

我正在尝试构建一个要安装在 Ubuntu 20.04 上的软件包,但出现此错误:

dpkg-shlibdeps: error: no dependency information found for /usr/local/lib/libopencv_objdetect.so.407 (used by debian/face-detection-module/usr/lib/x86_64-linux-gnu/libkmsfacedetectionmoduleimpl.so.0.0.1~20.g0bc1900)
Hint: check if the library actually comes from a package.

this答案我正在尝试添加我的lib,

libopencv_objdetect.so.407
,在
Build-Depends:
debian/control
文件。

在答案的 b 部分,他们是这样说的:

然后你只需要添加一个 Build-Depends: on libsnmp-dev (>= whatever) 到你的包,并根据它构建(而不是 /usr/local 中手动安装的 .so 文件)。

在我的例子中,听起来我需要在我的包中添加一个 Build-Depends on libopencv-dev (>= whatever),并针对它进行构建。

这就是我迷路的地方。

  1. 这个短语“build against”,是什么意思?

  2. 我的第二个问题是我怎么知道我需要什么

    libopencv-dev
    而不是其他可能有
    libopencv_objdetect.so.407
    的包裹?

我知道有一个命令可以列出共享库依赖关系,

ldd
,但它只提供更多的 .os 文件,而不是像
libopencv-dev


我会提供更多可能有用也可能没用的上下文

我正在为 kurento-media-server 版本 7.0.0 创建一个模块/插件。我正在使用 kurento-media-server-dev 生成的代码来帮助构建过程。

该模块假设使用OpenCV的DNN(深度神经网络)来检测人脸。

Kurento 使用 CMake 帮助构建文件。自动生成的代码包含这个 Debian/控制文件:

  1 Source: face-detection-module
  2 Maintainer: Maintainer Name <[email protected]>
  3 Priority: optional
  4 Build-Depends:
  5  cmake,
  6  debhelper-compat (= 13),
  7  kurento-cmake-utils,
  8  kurento-module-core-dev,
  9  kurento-module-elements-dev,
 10  kurento-module-filters-dev,
 11  libgstreamer1.0-dev,
 12  libopencv-dev,
 13  pkg-config,
 14 Standards-Version: 4.5.1
 15 Homepage: https://www.example.com/
 16 #Vcs-Browser: https://git.example.com/face-detection-module
 17 #Vcs-Git: https://git.example.com/face-detection-module.git
 18 Rules-Requires-Root: no
 19
 20 Package: face-detection-module
 21 Architecture: any
 22 Section: libs
 23 Depends:
 24  ${misc:Depends},
 25  ${shlibs:Depends},
 26 Description: <Up to 60 chars single line summary>
 27  <Long description over several lines, indented with space>.
 28
 29 Package: face-detection-module-dev
 30 Architecture: any
 31 Section: libdevel
 32 Depends:
 33  ${misc:Depends},
 34  face-detection-module (= ${binary:Version}),
 35  kurento-module-core-dev,
 36  kurento-module-elements-dev,
 37  kurento-module-filters-dev,
 38 Description: <Up to 60 chars single line summary> (development files)
 39  <Long description over several lines, indented with space>.

我尝试将第 12 行从

libopencv-dev
更改为
libopencv-dev (< 5.0.0)

并运行他们的包生成器我得到这个:

sudo ~/kurento/ci-scripts/kurento-buildpackage.sh
[kurento-buildpackage.sh] ==================== BEGIN ====================
++ id -u
+ [[ 0 -eq 0 ]]
+ CFG_INSTALL_KURENTO=false
+ CFG_INSTALL_KURENTO_VERSION=
+ CFG_INSTALL_FILES=false
+ CFG_INSTALL_FILES_DIR=/home/mdominguez/github/kurento-face-detection
+ CFG_DSTDIR=/home/mdominguez/github/kurento-face-detection
+ CFG_ALLOW_DIRTY=false
+ CFG_RELEASE=false
++ date --utc +%Y%m%d%H%M%S
+ CFG_TIMESTAMP=20230420204823
+ CFG_APT_ADD_REPO=false
+ CFG_APT_PROXY_URL=
+ [[ 0 -gt 0 ]]
+ [[ -d /home/mdominguez/github/kurento-face-detection ]]
+ [[ -d /home/mdominguez/github/kurento-face-detection ]]
+ [[ false == \t\r\u\e ]]
+ CFG_APT_ADD_REPO=false
[kurento-buildpackage.sh] CFG_INSTALL_KURENTO=false
[kurento-buildpackage.sh] CFG_INSTALL_KURENTO_VERSION=
[kurento-buildpackage.sh] CFG_INSTALL_FILES=false
[kurento-buildpackage.sh] CFG_INSTALL_FILES_DIR=/home/mdominguez/github/kurento-face-detection
[kurento-buildpackage.sh] CFG_DSTDIR=/home/mdominguez/github/kurento-face-detection
[kurento-buildpackage.sh] CFG_ALLOW_DIRTY=false
[kurento-buildpackage.sh] CFG_RELEASE=false
[kurento-buildpackage.sh] CFG_TIMESTAMP=20230420204823
[kurento-buildpackage.sh] CFG_APT_ADD_REPO=false
[kurento-buildpackage.sh] CFG_APT_PROXY_URL=
+ source /etc/lsb-release
++ DISTRIB_ID=Ubuntu
++ DISTRIB_RELEASE=20.04
++ DISTRIB_CODENAME=focal
++ DISTRIB_DESCRIPTION='Ubuntu 20.04.6 LTS'
+ APT_ARGS=()
+ [[ -n '' ]]
+ [[ false == \t\r\u\e ]]
+ [[ false == \t\r\u\e ]]
[kurento-buildpackage.sh] Install build dependencies
+ export DEBIAN_FRONTEND=noninteractive
+ DEBIAN_FRONTEND=noninteractive
+ apt-get update
Hit:1 http://ppa.launchpad.net/ondrej/php/ubuntu focal InRelease
Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:4 http://ubuntu.openvidu.io/7.0.0 focal InRelease
Get:5 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:6 http://archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
Reading package lists... Done
E: Release file for http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease is not valid yet (invalid for another 15h 39min 3s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease is not valid yet (invalid for another 17h 24min 39s). Updates for this repository will not be applied.
E: Release file for http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease is not valid yet (invalid for another 15h 42min 10s). Updates for this repository will not be applied.
+ on_exit
[kurento-buildpackage.sh] ERROR (100)
[kurento-buildpackage.sh] ==================== END ====================
linux opencv ubuntu-20.04 kurento debian-packaging
© www.soinside.com 2019 - 2024. All rights reserved.