2017-06-28 5 views
0

にダウングレードすることはできません。人形は、私は私の人形マニフェストに次のように使用していることを確認インストール/最新

$packages = [ 
    '2klic-gateway=2.10.5', 
] 

package { $packages: ensure => latest } 

installed代わりのlatestを使用してみました。私は手動で私がapt-get install 2klic-gateway=2.10.5を使用することができますノードにSSHとそれが動作する場合

Error: Could not update: Execution of '/usr/bin/apt-get q -y -o DPkg::Options::=-force-confold install 2klic-gateway=2.10.5' returned 100: Reading package lists... 
Building dependency tree... 
Reading state information... 
The following package was automatically installed and is no longer required: 
2klic-updates 
Use 'apt-get autoremove' to remove it. 
The following packages will be DOWNGRADED: 
2klic-gateway 
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 5 not upgraded. 
Need to get 22.0 MB of archives. 
After this operation, 312 kB disk space will be freed. 
E: There are problems and -y was used without --force-yes 
Error: /Stage[main]/Main/Node[default]/Package[2klic-gateway=2.10.5]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get q -y -o DPkg::Options::=-force-confold install 2klic-gateway=2.10.5' returned 100: Reading package lists... 
Building dependency tree... 
Reading state information... 
The following package was automatically installed and is no longer required: 
2klic-updates 
Use 'apt-get autoremove' to remove it. 
The following packages will be DOWNGRADED: 
2klic-gateway 
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 5 not upgraded. 
Need to get 22.0 MB of archives. 
After this operation, 312 kB disk space will be freed. 
E: There are problems and -y was used without --force-yes 

:しかし、私は戻って、次のエラーが発生します。私はまた、プログラムを削除して、人形を実行することができますマニフェストは正常に動作します。私はこのようにインストールする際に--force-yesを使用するように人形を伝えることで、この問題を解決することができました

E: There are problems and -y was used without --force-yes 

答えて

0

:しかし、すぐに、私は-yフラグを追加すると、私は取得

package { 
    $packages: ensure => installed, 
    install_options => ['--force-yes'], 
} 

私はオープン、この質問を残しますこの答えは安全ではありません。

--force-yes 
     Force yes; this is a dangerous option that will cause apt to continue 
     without prompting if it is doing something potentially harmful. It 
     should not be used except in very special situations. Using force-yes 
     can potentially destroy your system! Configuration Item: 
     APT::Get::force-yes. This is deprecated and replaced by 
     --allow-downgrades, --allow-remove-essential, 
     --allow-change-held-packages in 1.1. 

オプション#2

あなたのノードはaptのバージョン1.1以降がシステムを実行している場合は、--allow-downgrades代わりの--force-yes使用することができます。まだmanページにはお勧めできませんが、これは、より安全なオプションです:

--allow-downgrades 
     This is a dangerous option that will cause apt to continue without 
     prompting if it is doing downgrades. It should not be used except 
     in very special situations. Using it can potentially destroy your 
     system! Configuration Item: APT::Get::allow-downgrades. Introduced 
     in APT 1.1. 

は、残念ながら私の状況では、私のノードは、aptのバージョン1を実行しているので、これはがちのバージョンをアップグレードする最初必要となります。

関連する問題