pbuilder-dist dh_build 无法找到/安装 debian/control Depends

pbuilder-dist dh_build 无法找到/安装 debian/control Depends

我一直在关注教程6. 打包新软件关于如何创建 ubuntu/debian 包。我已经成功管理了 hello 示例,但我自己的共享库包遇到了一些问题。

我已通过运行以下命令成功构建了该包:

bzr builddeb -- -us -uc

但是当我尝试使用pbuilder-dist(这是为了模拟新发行版的情况)我收到一个与缺少我的软件包所依赖的库相关的错误。我运行:

pbuilder-dist trusty build libnpregression_1.0-0ubuntu1.dsc 

并得到:

 debian/rules build
dh build 
   dh_testdir
   dh_auto_configure
-- The C compiler identification is GNU 4.8.2
-- The CXX compiler identification is GNU 4.8.2
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/x86_64-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++
-- Check for working CXX compiler: /usr/bin/x86_64-linux-gnu-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Could NOT find Armadillo (missing:  ARMADILLO_LIBRARY ARMADILLO_INCLUDE_DIR) 
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:27 (find_package)


CMake Error at CMakeLists.txt:33 (message):
  flann library not found


-- Configuring incomplete, errors occurred!
See also "/tmp/buildd/libnpregression-1.0/obj-x86_64-linux-gnu/CMakeFiles/CMakeOutput.log".
dh_auto_configure: cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None returned exit code 1
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

看来 pbuilder-dist 没有安装那些依赖项(armadillo、flann 和 boost)。

什么让我困惑这些依赖项是在 debian/control 文件中指定的:

Source: libnpregression
Priority: optional
Maintainer: Guillaume de Chambrier <[email protected]>
Build-Depends: debhelper (>= 9), cmake
Standards-Version: 3.9.5
Section: libs
Homepage: https://github.com/gpldecha/non-parametric-regression


Package: libnpregression-dev
Section: libdevel
Architecture: any
Depends: libboost-all-dev, libnpregression1 (= ${binary:Version})
Description: Header files of non-parameteric regression library.
 This is an extended description of libnpregression-dev

Package: libnpregression1
Section: libs
Architecture: any
Depends: libflann-dev, libboost-all-dev, libarmadillo-dev, ${shlibs:Depends}, ${misc:Depends}
Description: Shared library files of non-parameteric regresion library.
 This is an extended description of libnpregression1

我将非常感激任何帮助我解决 pbuilder-dist 构建依赖性问题的帮助。我对打包 debian 项目还很陌生。

答案1

  • libflann-dev, libboost-all-dev, libarmadillo-dev应添加到Build-Depends:字段。
  • Depends:是运行时依赖项。

参考: 第 7 章-声明包之间的关系

提示:保持“Debian 政策手册”打开。

相关内容