質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
PowerShell

Windows PowerShellはコマンドラインインターフェースであり、システム管理を含むWindowsタスク自動化のためのスクリプト言語です。

コマンドプロンプト

コマンドプロンプト(cmd.exe)はMicrosoftによって提供されているコマンドラインインタプリタです。OS/2・Windows CE・Windows NTで使用可能です。

Q&A

解決済

1回答

4291閲覧

chocolateyを使用可能にしたい

yu1212

総合スコア13

PowerShell

Windows PowerShellはコマンドラインインターフェースであり、システム管理を含むWindowsタスク自動化のためのスクリプト言語です。

コマンドプロンプト

コマンドプロンプト(cmd.exe)はMicrosoftによって提供されているコマンドラインインタプリタです。OS/2・Windows CE・Windows NTで使用可能です。

1グッド

1クリップ

投稿2018/11/25 03:02

編集2018/11/25 07:36

前提・実現したいこと

chocolateyをインストールしたのですが、どのコマンドもアクセス拒否となります。
どなたかご教示いただけますでしょうか?

choco install rsync --version 5.5.0を実行したところ、以下のエラーメッセージが発生しました。

発生している問題・エラーメッセージ

choco install rsync --version 5.5.0 Chocolatey v0.10.11 Chocolatey detected you are not running from an elevated command shell (cmd/powershell). You may experience errors - many functions/packages require admin rights. Only advanced users should run choco w/out an elevated shell. When you open the command shell, you should ensure that you do so with "Run as Administrator" selected. If you are attempting to use Chocolatey in a non-administrator setting, you must select a different location other than the default install location. See https://chocolatey.org/install#non-administrative-install for details. Do you want to continue?([Y]es/[N]o): Y Installing the following packages: rsync By installing you accept licenses for the packages. rsync not installed. An error occurred during installation: パス 'C:\ProgramData\chocolatey\lib\rsync\tools' へのアクセスが拒否されました。 rsync package files install completed. Performing other installation steps. This is try 1/3. Retrying after 300 milliseconds. Error converted to warning: パス 'C:\ProgramData\chocolatey.chocolatey' へのアクセスが拒否されました。 This is try 2/3. Retrying after 400 milliseconds. Error converted to warning: パス 'C:\ProgramData\chocolatey.chocolatey' へのアクセスが拒否されました。 Maximum tries of 3 reached. Throwing error. Cannot create directory "C:\ProgramData\chocolatey.chocolatey". Error was: System.UnauthorizedAccessException: パス 'C:\ProgramData\chocolatey.chocolatey' へのアクセスが拒否されました。 場所 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) 場所 System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost) 場所 System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost) 場所 chocolatey.infrastructure.filesystem.DotNetFileSystem.<>c__DisplayClass64.<create_directory>b__63() 場所 chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1.<retry>b__0() 場所 chocolatey.infrastructure.tolerance.FaultTolerance.retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent) 場所 chocolatey.infrastructure.filesystem.DotNetFileSystem.create_directory(String directoryPath) 場所 chocolatey.infrastructure.filesystem.DotNetFileSystem.create_directory_if_not_exists(String directoryPath, Boolean ignoreError) パス 'C:\ProgramData\chocolatey.chocolatey' へのアクセスが拒否されました。

Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. PS C:\WINDOWS\system32> choco install rsync --version 5.5.0 Chocolatey v0.10.11 Installing the following packages: rsync By installing you accept licenses for the packages. rsync v5.5.0 [Approved] rsync package files install completed. Performing other installation steps. The package rsync wants to run 'chocolateyInstall.ps1'. Note: If you don't run this script, the installation will fail. Note: To confirm automatically next time, use '-y' or consider: choco feature enable -n allowGlobalConfirmation Do you want to run the script?([Y]es/[N]o/[P]rint): Y Attempt to get headers for https://www.itefix.net/dl/cwRsync_5.5.0_x86_Free.zip failed. The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://www.itefix.net/dl/cwRsync_5.5.0_x86_Free.zip'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found." Downloading rsync from 'https://www.itefix.net/dl/cwRsync_5.5.0_x86_Free.zip' ERROR: The remote file either doesn't exist, is unauthorized, or is forbidden for url 'https://www.itefix.net/dl/cwRsync_5.5.0_x86_Free.zip'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found." This package is likely not broken for licensed users - see https://chocolatey.org/docs/features-private-cdn. The install of rsync was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\rsync\tools\chocolateyInstall.ps1'. See log for details. Chocolatey installed 0/1 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log). Failures - rsync (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\rsync\tools\chocolateyInstall.ps1'. See log for details.

試したこと

①環境変数をみて、優先度をあげてみましたが、解決には至らずでした。
②管理者権限でコマンドプロンプトを開き実行

補足情報(FW/ツールのバージョンなど)

chocolatey Chocolatey v0.10.11

DrqYuto👍を押しています

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

ベストアンサー

コマンドプロンプトを管理者権限で開いた上で、chocoコマンドを実行してみてください。

投稿2018/11/25 05:43

kazto

総合スコア7196

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

yu1212

2018/11/25 06:33

ありがとうございます。 確認してみます。
yu1212

2018/11/25 07:38 編集

上記試しましたが。少し進んだようですが、途中からエラーになりましたので、再度ご確認お願いします。
kazto

2018/11/25 08:03

「choco install rsync --version 5.5.0」とバージョンを限定していることに意図はありますでしょうか。どこかのサイトの真似でしたら、バージョンのオプションを行わず、「choco install rsync」だけで実行してはいかがでしょうか。
yu1212

2018/11/25 08:38

承知しました。
guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問