2017-05-09 9 views
0

Powershell을 통해 Chocolatey를 설치하는 단계는 Windows 7 64 비트 PC에서 작동하지 않습니다. 나는 내가 ExecutionPolicy를 확인하고 해당 시스템 경로 파워 쉘 있다 https://chocolatey.org/install#install-from-powershell-v3Chocolatey가 설치되지 않음

  • 을 다음 해요;

    PS C:\Users\a> Get-ExecutionPolicy 
    AllSigned 
    
    PS C:\Users\a> ($env:Path).split(';') 
    %SystemRoot%\system32\WindowsPowerShell\v1.0\ 
    C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common 
    C:\Program Files (x86)\Intel\iCLS Client\ 
    C:\Program Files\Intel\iCLS Client\ 
    C:\ProgramData\Oracle\Java\javapath 
    C:\Windows\system32 
    C:\Windows 
    C:\Windows\System32\Wbem 
    C:\Windows\System32\WindowsPowerShell\v1.0\ 
    C:\Program Files\Java\jre1.8.0_40\bin 
    C:\Program Files\Java\jdk1.8.0_40\bin 
    C:\Program Files (x86)\AMD\ATI.ACE\Core-Static 
    C:\Windows\System32\WindowsPowerShell\v1.0\ 
    C:\Program Files\Intel\Intel(R) Management Engine Components\DAL 
    C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL 
    C:\Program Files\Intel\Intel(R) Management Engine Components\IPT 
    C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT 
    C:\HashiCorp\Vagrant\bin 
    C:\Program Files (x86)\Git\bin 
    C:\Program Files (x86)\Skype\Phone\ 
    C:\Program Files (x86)\Git\bin 
    C:\Program Files (x86)\Git\libexec\git-core 
    
    C:\Program Files (x86)\Nmap 
    C:\Program Files\smartmontools\bin 
    
  • 다음은 제 오류입니다.

    PS C:\Users\a> iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex 
    ???# : The term '???#' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 
    At line:1 char:1 
    + ???# ===================================================================== 
    + ~~~~ 
        + CategoryInfo   : ObjectNotFound: (???#:String) [], CommandNotFoundException 
        + FullyQualifiedErrorId : CommandNotFoundException 
    
    Getting latest version of the Chocolatey package for download. 
    Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.5. 
    !Test-Path : The term '!Test-Path' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. 
    At line:188 char:11 
    + } elseif (!Test-Path $7zaExe) { 
    +   ~~~~~~~~~~ 
        + CategoryInfo   : ObjectNotFound: (!Test-Path:String) [], CommandNotFoundException 
        + FullyQualifiedErrorId : CommandNotFoundException 
    
    Extracting C:\Users\a\AppData\Local\Temp\chocolatey\chocInstall\chocolatey.zip to C:\Users\a\AppData\Local\Temp\chocolatey\chocInstall... 
    Exception calling "Start" with "0" argument(s): "The system cannot find the file specified" 
    At line:211 char:3 
    + $process.Start() | Out-Null 
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
        + CategoryInfo   : NotSpecified: (:) [], MethodInvocationException 
        + FullyQualifiedErrorId : Win32Exception 
    
    Exception calling "BeginOutputReadLine" with "0" argument(s): "StandardOut has not been redirected or the process hasn't started yet." 
    At line:212 char:3 
    + $process.BeginOutputReadLine() 
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
        + CategoryInfo   : NotSpecified: (:) [], MethodInvocationException 
        + FullyQualifiedErrorId : InvalidOperationException 
    
    Exception calling "WaitForExit" with "0" argument(s): "No process is associated with this object." 
    At line:213 char:3 
    + $process.WaitForExit() 
    + ~~~~~~~~~~~~~~~~~~~~~~ 
        + CategoryInfo   : NotSpecified: (:) [], MethodInvocationException 
        + FullyQualifiedErrorId : InvalidOperationException 
    
    Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' and call install again. Error: 7-Zip signalled an unknown error (code) 
    At line:225 char:15 
    +  default { throw "$errorMessage 7-Zip signalled an unknown error (code $exitC ... 
    +    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
        + CategoryInfo   : OperationStopped: (Unable to unzip...n error (code):String) [], RuntimeException 
        + FullyQualifiedErrorId : Unable to unzip package using 7zip. Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' and call install again. Error: 7-Zip signalled an unknown error (code) 
    
  • 나는 마지막 줄

    Perhaps try setting $env:chocolateyUseWindowsCompression = 'true' 
    

    그러나 다른 오류

+0

AllSigned는 현재 우리가 PowerShell을 팀에 전달 PowerShell의 일부 발견 된 버그로 인해 작동하지 않을. 0.10.6이 나오면 다시 작동합니다. 다른 문제에 관해서는, 오늘 BOM과 함께 도입되어 Authenticode가 비 BOM 파일의 유니 코드 문자 (우리가 최근에 발견 한 두 번째 문제점)에서 실패하지 않는다는 것을 보장합니다. - 적절한 문제를 제기하여 해결할 수 있도록하십시오. . – ferventcoder

+0

https://github.com/chocolatey/choco (우리는 이미 allsigned에 대한 문제가 있지만 수정) BOM install.ps1 스크립트는 https://github.com/chocolatey/chocolatey.org입니다. 감사! – ferventcoder

+0

https://github.com/chocolatey/chocolatey.org/issues/512 – ferventcoder

답변

1
 
PS C:\admin\scripts>iwr https://chocolatey.org/install.ps1 -UseBasicParsing 


StatusCode  : 200 
StatusDescription : OK 
Content   : # ===================================================================== 
... 

당신이있어의 전체 시리즈 만 결과에 오류 메시지 제안을 시도 UTF-8로 인코딩 된 파일 다운로드 (내용은 특성 UTF-8로 시작 함) byte order mark), ASCII 텍스트로 취급됩니다.

이 외에도 :

나는 https://chocolatey.org/install#install-from-powershell-v3를 다음과 같은거야.

아니요, 그렇지 않습니다. 당신이 참조 된 웹 사이트는 사용할 지시

당신은 당신이 내용에서 BOM을 제거 할 필요가있는 접근 방식을 사용하려면

iwr https://chocolatey.org/install.ps1 -UseBasicParsing | iex 

을 사용하려는 반면, 같은 광고 작동

iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) 

Invoke-Expression으로 배관하기 전에 :

(iwr https://chocolatey.org/install.ps1 -UseBasicParsing).Content -replace '^' | iex 
+0

더 많은 옵션을 클릭하면 그가 링크하고있는 것을 볼 수 있습니다. PowerShell이 ​​파일을 적절히 처리하여 UTF8 b/c BOM을 볼 수 있습니다 (그러나 분명하지는 않습니다). – ferventcoder

+0

프론트 페이지에 제대로 작동하는 경우 "추가 옵션"을 사용하지 않는 경향이 있습니다. –