2013-03-15 142 views
0

我试图通过木偶安装mysql,使用下面的代码安装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] 
+0

看来这些软件包只是不在版本库中。版本号与您的错误不同 – iamauser 2013-03-15 15:06:52

回答

1

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

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

所以你的情况,傀儡所期望的资源像下面的存在:

 
    package { 
    'mysql-client-core-5.5': ensure => present 
    } 

如果要强制执行包的特定版本,则需要的参数是不一样。