Debian打包:mk-build-deps无法安装特定版本的Build-Depends软件包

维塔利·伊萨耶夫(Vitaly Isaev)

我需要构建一个项目,该项目取决于第三方库的特定版本:

➜  cat debian/control 
Source: libhole-cpp
Priority: optional
Maintainer: Vitaly Isaev <[email protected]>
Build-Depends: debhelper (>= 9), cmake, 
    flatbuffers (= 1.2.0-1),
    libboost-dev,
    libboost-system-dev,
    catch
Standards-Version: 3.9.5

但是,flatbuffers我们的仓库中有几个软件包,包括较新的软件包:

➜  apt-cache policy flatbuffers
flatbuffers:
  Installed: (none)
  Candidate: 1.4.0-17
  Version table:
     1.4.0-17 500
        500 http://repo12.mailbuild-2.embarce.ro xenial/local amd64 Packages
     1.2.0-1 500
        500 http://repo12.mailbuild-2.embarce.ro xenial/local amd64 Packages

在这种情况下,mk-build-deps拒绝安装所需版本的软件包:

➜  sudo mk-build-deps --install debian/control
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_installdocs
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'libhole-cpp-build-deps' in '../libhole-cpp-build-deps_1.0.1ubuntu1_all.deb'.

The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
Selecting previously unselected package libhole-cpp-build-deps.
(Reading database ... 68846 files and directories currently installed.)
Preparing to unpack libhole-cpp-build-deps_1.0.1ubuntu1_all.deb ...
Unpacking libhole-cpp-build-deps (1.0.1ubuntu1) ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies...Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) libhole-cpp-build-deps [ amd64 ] < 1.0.1ubuntu1 > ( devel )
Broken libhole-cpp-build-deps:amd64 Depends on flatbuffers [ amd64 ] < none -> 1.4.0-17 > ( devel ) (= 1.2.0-1)
  Considering flatbuffers:amd64 0 as a solution to libhole-cpp-build-deps:amd64 -2
  Removing libhole-cpp-build-deps:amd64 rather than change flatbuffers:amd64
Done
 Done
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done
The following packages will be REMOVED:
  libhole-cpp-build-deps
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 9216 B disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 68850 files and directories currently installed.)
Removing libhole-cpp-build-deps (1.0.1ubuntu1) ...
mk-build-deps: Unable to install libhole-cpp-build-deps at /usr/bin/mk-build-deps line 402.
mk-build-deps: Unable to install all build-dep packages
➜  libhole-cpp git:(v12) ✗ sudo apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

谁能澄清我的构建工具链出了什么问题?操作系统是Ubuntu 16.04。

红宝石

tldr;

aspcud通过apt-cudf-get以下方式委托给求解器

mk-build-deps \
    --install \
    --remove \
    --tool \
    'apt-cudf-get --solver aspcud -o APT::Get::Assume-Yes=1 -o Debug::pkgProblemResolver=0 -o APT::Install-Recommends=0' \
    debian/control

解释

该解决方案与Johannes Schauer的解决方案的不同之处在于...

  • 它使用apt-cudf-get而不是apt-get
  • 它忽略了以下选项(在我的测试中不起作用):
    • -o APT::Solver::Strict-Pinning=false
    • -o APT::Solver::aspcud::Preferences="-new,-removed,-changed"
  • 它添加了以下选项:
    • -o APT::Get::Assume-Yes=1 (以非交互方式安装软件包)
    • -o Debug::pkgProblemResolver=1mk-build-deps --tool默认)
    • -o APT::Install-Recommends=0mk-build-deps --tool默认)

参考:

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

如何安装Debian软件包的Build-Depends和Depends

检查debian / control Build-Depends:向后移植软件包时是否满足要求

安装anaconda软件包的特定BUILD

Fedora与Debian build-essential软件包等效吗?

安装特定版本的debian软件包

无法安装Debian软件包

Debian Build - 依赖于非软件包二进制文件

如何使用“ equivs-build”创建一个debian软件包,如果已经安装,可以“升级”?

pkgdown R软件包的build_site函数导致无法加载依赖的软件包

无法找到软件包firefox-mozilla-build

使debian软件包安装python

Debian实验软件包拒绝安装?

通过Synaptic安装debian软件包

Debian默认安装软件包列表?

Debian软件包,安装依赖项

Debian 8:无法找到软件包

恢复NuGet软件包时,在TFS Build 2015中出现“无法找到版本”

无法在docker build上安装位于私人Nexus存储库中的python软件包

恢复软件包时,dotnet build命令失败

缺少Sublime Text Build System的F#软件包

'dotnet build'命令未找到NuGet软件包(存在)

如果删除软件包,则需要重新安装Nuget.build软件包

无法在Debian Jessie中安装R软件包

Debian:由于软件包损坏,无法安装qtcreator

Debian 11:无法安装软件包 libnorm1

运行与 Debian 软件包并排/并行安装的 snap 包?

用于本地定制软件包的Debian软件包的版本号

已安装软件包推荐的Debian列出软件包

如何在不安装的情况下下载特定版本的Debian软件包及其所有依赖项(包括推荐的软件包)?