LoginSignup
11
10

More than 5 years have passed since last update.

Chocolatey v0.9.8.28になってからエラーが出るぜ!

Posted at

Chocolatey v0.9.8.28

古いバージョンのChocolateyから新しいバージョンのChocolateyにアップデートすると以下のようなメッセージが表示されるのでその対応方法です。

https://chocolatey.org/

The default install location has been changed to 'C:\ProgramData\chocolatey'.
  This install will be updated to that location in the next version. It
  is strongly suggested you move this installation to the new location
  as soon as possible to limit write access from all users. Do not forget
  to update PATH & ChocolateyInstall environment variables.

いままで C:\chocolatey で管理されていたけど新しいバージョンでは C:\ProgramData\chocolatey になったからっていうメッセージなんだけどねw

対応方法

管理者権限でdos窓を開き下記のコマンドを実行します。

cd c:\
md ProgramData\chocolatey
xcopy /s /e c:\chocolatey\*.* ProgramData\chocolatey\.
rd chocolatey /s /q

環境変数の設定

すでに登録されているChocolateyの環境変数を修正(追加)します。
[コントロール パネル - システムとセキュリティ - システム - システムの詳細設定]を開きます。

choco.png

変更点
 ・ChocolateyInstall に、C:\ProgramData\chocolatey
 ・Path に、C:\ProgramData\chocolatey\bin

設定変更後にdos窓を開きなおすか、PCを再起動します。

パッケージインストールしたソフトが動作しないんだけど

パッケージを再インストールすれば問題が解決します。C:\ProgramData\chocolatey\lib したにある対象のプログラムディレクトリを削除して、再度 choco update hogehoge などすれば問題ありません(場合によっては、choco install hogehoge

参考サイト

ってそのままだけどw

Migrate Old Chocolatey Directory to ProgramData

11
10
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
10