如何在 Debian 9 stretch 上安装 puppet 3.X 客户端?

How to install puppet 3.X client on Debian 9 stretch?

我放入旧版 Debian / Ubuntu 发行版的回购:

root@canais-c-solr01:~# cat /etc/apt/sources.list.d/puppet.list 
# Puppetlabs products
deb http://apt.puppetlabs.com trusty main
deb-src http://apt.puppetlabs.com trusty main

# Puppetlabs dependencies
deb http://apt.puppetlabs.com trusty dependencies
deb-src http://apt.puppetlabs.com trusty dependencies

# Puppetlabs devel (uncomment to activate)
# deb http://apt.puppetlabs.com trusty devel
# deb-src http://apt.puppetlabs.com trusty devel

当我尝试安装从 apt-cache show puppet 获得的版本时:

root@canais-c-solr01:~# apt-get install puppet=3.8.7-1puppetlabs1 puppet-common=3.8.7-1puppetlabs1  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 puppet-common : Depends: libaugeas-ruby but it is not installable or
                          libaugeas-ruby1.9.1 but it is not installable or
                          libaugeas-ruby1.8 but it is not installable
E: Unable to correct problems, you have held broken packages.

目前无法将 master 更新为更新的 puppet。

apt-get install sysv-rc libruby

dpkg -i /tmp/libaugeas-ruby_0.5.0-2_all.deb
dpkg -i /tmp/puppet-common_3.8.4-1puppetlabs1_all.deb
dpkg -i /tmp/puppet_3.8.4-1puppetlabs1_all.deb

我们不得不从另一台 debian 机器上获取这些软件包。

第一次尝试安装 .deb 后会出现错误。之后你将不得不做。

apt-get install -f 
apt-get purge puppet puppet-common

然后重试。