Puppet - 无法找到软件包 oracle-java8-installer
Puppet - Unable to locate package oracle-java8-installer
我正在使用 Puppet spantree/java8 模块在 Vagrant hashicorp/precise32
机器上安装 Java 8
。安装时出现以下异常:
==> default: Notice: /Stage[main]/Java8/File[/tmp/java.preseed]/ensure: defined content as '{md5}1b89c67b59fa03a9210a7b22a6b51b92'
==> default: Notice: /Stage[main]/Apache/Package[apache2]/ensure: ensure changed 'purged' to 'present'
==> default: Notice: /Stage[main]/Java8/Apt::Ppa[ppa:webupd8team/java]/Exec[add-apt-repository-ppa:webupd8team/java]/returns: executed successfully
==> default: Notice: /Stage[main]/Java8/File[/etc/profile.d/set_java_home.sh]: Dependency Package[oracle-java8-installer] has failures: true
==> default: Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install oracle-java8-installer' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: E: Unable to locate package oracle-java8-installer
==> default: Error: /Stage[main]/Java8/Package[oracle-java8-installer]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install oracle-java8-installer' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: E: Unable to locate package oracle-java8-installer
==> default: Warning: /Stage[main]/Java8/File[/etc/profile.d/set_java_home.sh]: Skipping because of failed dependencies
我预测 第 1 行有问题。 - 文件 init.pp 中的 48:
ubuntu: {
include apt
apt::ppa { 'ppa:webupd8team/java': }
package { 'oracle-java8-installer':
responsefile => '/tmp/java.preseed',
require => [
Apt::Ppa['ppa:webupd8team/java'],
File['/tmp/java.preseed']
],
}
知道如何解决吗?
P.S:我正在使用 librarian-puppet
从 Puppet forge 下载 spantree/java8 模块。
通过确保 apt-get update
在添加新 ppa 后运行,最终能够通过错误 - 这是我在 java8/manifests/init.pp
中的更改:
ubuntu: {
include apt
apt::ppa { 'ppa:webupd8team/java': }
exec { 'apt-update':
command => "/usr/bin/apt-get update",
require => [
Apt::Ppa['ppa:webupd8team/java']
],
}
package { 'oracle-java8-installer':
responsefile => '/tmp/java.preseed',
require => [
Exec['apt-update'],
File['/tmp/java.preseed']
],
}
}
我正在使用 Puppet spantree/java8 模块在 Vagrant hashicorp/precise32
机器上安装 Java 8
。安装时出现以下异常:
==> default: Notice: /Stage[main]/Java8/File[/tmp/java.preseed]/ensure: defined content as '{md5}1b89c67b59fa03a9210a7b22a6b51b92'
==> default: Notice: /Stage[main]/Apache/Package[apache2]/ensure: ensure changed 'purged' to 'present'
==> default: Notice: /Stage[main]/Java8/Apt::Ppa[ppa:webupd8team/java]/Exec[add-apt-repository-ppa:webupd8team/java]/returns: executed successfully
==> default: Notice: /Stage[main]/Java8/File[/etc/profile.d/set_java_home.sh]: Dependency Package[oracle-java8-installer] has failures: true
==> default: Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install oracle-java8-installer' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: E: Unable to locate package oracle-java8-installer
==> default: Error: /Stage[main]/Java8/Package[oracle-java8-installer]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install oracle-java8-installer' returned 100: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: E: Unable to locate package oracle-java8-installer
==> default: Warning: /Stage[main]/Java8/File[/etc/profile.d/set_java_home.sh]: Skipping because of failed dependencies
我预测 第 1 行有问题。 - 文件 init.pp 中的 48:
ubuntu: {
include apt
apt::ppa { 'ppa:webupd8team/java': }
package { 'oracle-java8-installer':
responsefile => '/tmp/java.preseed',
require => [
Apt::Ppa['ppa:webupd8team/java'],
File['/tmp/java.preseed']
],
}
知道如何解决吗?
P.S:我正在使用 librarian-puppet
从 Puppet forge 下载 spantree/java8 模块。
通过确保 apt-get update
在添加新 ppa 后运行,最终能够通过错误 - 这是我在 java8/manifests/init.pp
中的更改:
ubuntu: {
include apt
apt::ppa { 'ppa:webupd8team/java': }
exec { 'apt-update':
command => "/usr/bin/apt-get update",
require => [
Apt::Ppa['ppa:webupd8team/java']
],
}
package { 'oracle-java8-installer':
responsefile => '/tmp/java.preseed',
require => [
Exec['apt-update'],
File['/tmp/java.preseed']
],
}
}