![为 apt-get build-dep 指定 PPA 版本?](https://linux22.com/image/1134699/%E4%B8%BA%20apt-get%20build-dep%20%E6%8C%87%E5%AE%9A%20PPA%20%E7%89%88%E6%9C%AC%EF%BC%9F.png)
在 Ubuntu 14.04 上,我想ardour
从源代码重建软件包,并且我在 PPA 中找到了合适的版本,并且我已经激活了它的源(deb-src
在正确文件的某处/etc/apt/sources.list*
);我可以从 PPA 安装软件包(但有一个错误需要重新编译)。
此时,apt-cache
报告 PPA 中的版本:
$ apt-cache showpkg ardour
Package: ardour
Versions:
1:4.7.270+r15291.42~ubuntu14.04.1 (/var/lib/apt/lists/ppa.launchpad.net_dobey_audiotools_ubuntu_dists_trusty_main_binary-i386_Packages)
...
1:4.7.270+r15280.42~ubuntu14.04.1 (/var/lib/dpkg/status)
...
1:2.8.16+git20131003-1 (/var/lib/apt/lists/dk.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-i386_Packages)
...
Provides:
1:4.7.270+r15291.42~ubuntu14.04.1 -
1:4.7.270+r15280.42~ubuntu14.04.1 -
1:2.8.16+git20131003-1 -
Reverse Provides:
ardour-i686 1:2.8.16+git20131003-1
此外,如果我想下载源包,我会得到正确的包:
$ apt-get source ardour
Reading package lists... Done
Building dependency tree
Reading state information... Done
Need to get 10.5 MB of source archives.
Get:1 http://ppa.launchpad.net/dobey/audiotools/ubuntu/ trusty/main ardour 1:4.7.270+r15291.42~ubuntu14.04.1 (tar) [10.5 MB]
...
到目前为止一切顺利。但是,当我尝试通过 安装构建依赖项时build-dep
,我得到了以下信息:
$ sudo apt-get build-dep ardour
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have unmet dependencies:
libjack-dev : Depends: libjack0 (= 1:0.121.3+20120418git75e3e20b-2.1ubuntu1) but it is not going to be installed
E: Build-dependencies for ardour could not be satisfied.
这是错误的 - 这ardour
使用libjack2
- 如果我继续sudo apt-get install libjack0
,该操作将删除libjack2
和ardour
。
我已经看到man apt-get
我可以为指定包的版本build-dep
,但不知何故它不起作用:
$ sudo apt-get build-dep ardour=4.7.270+r15291.42~ubuntu14.04.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Can not find version '4.7.270+r15291.42~ubuntu14.04.1' of package 'ardour'
E: Unable to find a source package for ardour
$ sudo apt-get build-dep ardour=4.7.270
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Can not find version '4.7.270' of package 'ardour'
E: Unable to find a source package for ardour
那么——我如何指定apt-get
我想要的build-dep
这个特定的 PPA 版本?
答案1
您忘记了1:
版本号中的 。它不是为了美化输出,而是版本的一部分 - 纪元号。为什么有些软件包的版本字符串前面有多余的数字?
答案2
好的,我找到了答案,就我发布问题的方式而言 - 首先,从源文件中,有:
./debian/rules: ARDOUR_VERSION=`head -1 debian/changelog | awk -F'[()]' '{print $$2}'|cut -d~ -f1|cut -d: -f2`
啊哈,所以我需要看看debian/changelog
在这种情况下哪个是头:
ardour (1:4.7.270+r15291.42~ubuntu14.04.1) trusty; urgency=low
因此,基本上,1:
还需要包含前缀,上面我省略了它:
$ sudo apt-get build-dep ardour=1:4.7.270+r15291.42~ubuntu14.04.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have unmet dependencies:
libjack-dev : Depends: libjack0 (= 1:0.121.3+20120418git75e3e20b-2.1ubuntu1) but it is not going to be installed
E: Build-dependencies for ardour=1:4.7.270+r15291.42~ubuntu14.04.1 could not be satisfied.
但是,依赖性问题仍然存在(编辑:解决方案在我的评论中无法安装 libjack-dev - 询问 Ubuntu- 而是使用libjack-jackd2-dev
)——但至少现在很清楚这不是由于错误的版本引用......