E: Unable to locate package <package_name>

asked 2015-03-16 13:17:49 -0600

AlexM gravatar image

updated 2015-03-16 15:01:01 -0600

csharpsteen gravatar image

Good day,

I have a problem with installing packages in the remote Ubuntu 14.0.4 box using Puppet.

Puppet version :  3.7.4
Installed module: puppetlabs-apt (v1.7.0)

site.pp: **import 'nodes/ubuntu/my_host_name.pp'**

nodes/ubuntu/my_host_name.pp:

**node 'my_host_name' {
include apt
$pkg_list = ["samba", "libmaven-jar-plugin-java-doc"]** // there are much more packages, but i do not want to spend your time
**package {
    $pkg_list: ensure => "latest"
    }
}**

nodes/ubuntu/ubuntu.pp:

**class { 'apt':
    always_apt_update    => true,
    apt_update_frequency => daily,
    disable_keys         => true,
    proxy_host           => false,
    proxy_port           => '8080',
    purge_sources_list   => false,
    purge_sources_list_d => false,
    purge_preferences_d  => false,
    update_timeout       => undef,
    fancy_progress       => true
}**
when i run: 'puppet agent --test' on the remote host i have got the following errors:

**puppet agent --verbose --test
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/apt_updates.rb
Info: Loading facts in /var/lib/puppet/lib/facter/puppet_vardir.rb
Info: Loading facts in /var/lib/puppet/lib/facter/apt_update_last_success.rb
Info: Loading facts in /var/lib/puppet/lib/facter/python_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pe_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/facter_dot_d.rb
Info: Loading facts in /var/lib/puppet/lib/facter/pip_version.rb
Info: Loading facts in /var/lib/puppet/lib/facter/root_home.rb
Info: Loading facts in /var/lib/puppet/lib/facter/virtualenv_version.rb
Info: Caching catalog for st0dl0000000947.sats.corp
Info: Applying configuration version '1426527277'
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libmaven-jar-plugin-java-doc ' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libmaven-jar-plugin-java-doc 
Error: /Stage[main]/Main/Node[myhostname]/Package[libmaven-jar-plugin-java-doc ]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install libmaven-jar-plugin-java-doc ' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package libmaven-jar-plugin-java-doc 
Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install samba ' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package samba 
Error: /Stage[main]/Main/Node[myhostname]/Package[samba ]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install samba ' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package samba**

and the same results for the 17 packages included to the $pkg_list.

i have tried to install samba manually on the remote host:

apt-get install samba

**apt-get install samba
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libmodemmanagerqt1 libnetworkmanagerqt1 liboath0 libopenconnect2
Use 'apt-get autoremove' to remove them.
Suggested packages:
  bind9 bind9utils ldb-tools smbldap-tools winbind
The following NEW packages will be installed
  samba
0 to upgrade, 1 to newly install, 0 to remove and 3 not to upgrade.
Need to get 0 B/839 kB of archives.
After this operation, 11.4 MB of additional disk space ...
(more)
edit retag flag offensive close merge delete