2015-02-10 75 views
0
class shell_ubn { 
    file { 
     "/home/shellinabox/shellinabox_2.14-1_amd64.deb": 
     ensure => present, 
     mode => 0777, 
     source => "puppet:///modules/shell_ubn/shellinabox_2.14-1_amd64.deb", 
     notify => Package["Shellinabox"], 
    } 

    package { 
     "Shellinabox": 
     ensure => installed, 
     source => "/home/shellinabox/shellinabox_2.14-1_amd64.deb", 
     require => File["/home/shellinabox/shellinabox_2.14-1_amd64.deb"], 
    } 
} 

离线安装包有我的Ubuntu客户端上安装该程序包,但它给出了这样的错误:我如何从木偶清单

Error: /Stage[main]/Shell_ubn/Package[Shellinabox]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install Shellinabox' returned 100: Reading package lists... 
Building dependency tree... 
Reading state information... 
E: Unable to locate package Shellinabox 

回答

0

您需要的provider => 'dpkg'参数添加到您的package资源。

+0

仍然我得到的错误是: - > 错误:无法设置'存在'确保:您不能安装没有源20的dpkg软件包:/etc/puppet/modules/shell_ubn/manifests/init.pp 错误:无法设置'present'以确保:如果没有源,则无法在20处安装dpkg软件包:/etc/puppet/modules/shell_ubn/manifests/init.pp 包装异常: 无法安装没有源的dpkg软件包 – akshay 2015-02-11 05:14:07

+0

请帮助我....... – akshay 2015-02-11 05:15:16

+0

这没有任何意义。根据你的粘贴,'package'确实指定了一个源代码。如果事情发生了变化,请更新您的问题或提出新问题。 – 2015-02-11 16:40:15