2

I want to install puppet which version higher than 2.7.11 on Ubuntu, but the origin source version is 2.7.11, so I add the puppetlabs's source:

echo "deb http://apt.puppetlabs.com precise devel" > /etc/apt/sources.list.d/puppetlabs.list

then I use apt-get and then find the latest version is already 3.0.0 .But I just want to use 2.7.19 .So I edit the /etc/apt/preferences:

package:puppet
Pin: release  v=2.7.19*, o= "http://apt.puppetlabs.com/"
Pin-Priority: 1001

then I use apt-cache policy puppet ,but it seems this does not works as I expect:

puppet:
Installed: 3.0.0-0.1rc6puppetlabs1
Candidate: 3.0.0-0.1rc6puppetlabs1
Package pin: (not found)
Version table:
*** 3.0.0-0.1rc6puppetlabs1 1001
    500 http://apt.puppetlabs.com/ precise/devel amd64 Packages
    100 /var/lib/dpkg/status
 2.7.19-0.1rc3puppetlabs1 1001
    500 http://apt.puppetlabs.com/ precise/devel amd64 Packages

I have read the man 5 apt_preferences, but still can't make it works right.

4

1 回答 1

5

在此处阅读文件

表示 Release 文件中的"o="Origin。
如果你想使用http (作为sources.list中的源)......你应该写:

Pin: origin "http..." 

查看 man apt_preferences 以获得更多帮助!

于 2012-11-08T16:51:54.507 回答