Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby-on-rails-4/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过puppet安装mysql_Mysql_Puppet - Fatal编程技术网

通过puppet安装mysql

通过puppet安装mysql,mysql,puppet,Mysql,Puppet,我正在尝试通过puppet安装mysql,代码如下: class mysql::install { package { 'mysql-client': ensure => present, require => Package["mysql-client-core-5.5"]; } service { 'mysql': ensure => running; } } node default { in

我正在尝试通过puppet安装mysql,代码如下:

class mysql::install {
  package {
    'mysql-client': ensure => present,
                    require => Package["mysql-client-core-5.5"];
  }

  service {
    'mysql': ensure => running;
  }
}

node default {
  include mysql::install
}
但我收到了以下错误消息:

Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-common_5.1.63-0ubuntu0.10.04.1_all.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/libmysqlclient16_5.1.63-0ubuntu0.10.04.1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-client-core-5.1_5.1.63-0ubuntu0.10.04.1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-client-5.1_5.1.63-0ubuntu0.10.04.1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-server-core-5.1_5.1.63-0ubuntu0.10.04.1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-server-5.1_5.1.63-0ubuntu0.10.04.1_i386.deb  404  Not Found [IP: 91.189.91.13 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/m/mysql-dfsg-5.1/mysql-server_5.1.63-0ubuntu0.10.04.1_all.deb  404  Not Found [IP: 91.189.91.13 80]

我不知道这是否与您粘贴的特定问题有关,但如果这是完整的puppet代码,我认为您没有正确使用require参数。如果您已经为“mysql-client-core-5.5”定义了一个包资源,那么忽略这个答案的其余部分

require参数引用了另一个定义的资源。它表示在应用所需资源之前不要应用当前资源

因此,在您的情况下,puppet希望存在如下资源:

package { 'mysql-client-core-5.5': ensure => present } 包装{ “mysql-client-core-5.5”:确保=>存在 }
如果要强制执行特定版本的软件包,则require参数不是正确的方法。

这些软件包似乎不在存储库中。版本号与您的错误不同。。。