在Windows 10上安装Ganache.appx

时间:2018-01-02 04:32:51

标签: powershell appx truffle consensys-truffle

我在PowerShell中使用以下命令在我的Windows 10机器上安装Truffle的Ganache:

Add-AppxPackage -Path "C:\Users\mabel\Downloads\Ganache.appx"

每当我运行该命令时,我都会收到以下错误:

    Add-AppxPackage : Deployment failed with HRESULT: 0x80073CFD, A Prerequisite for an install could not be satisfied.
    Deployment Add operation with target volume C: on Package Ganache_1.0.1.0_x64__zh355ej5cj694 from:  (Ganache.appx)
    failed with error 0x80073CFD. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment
    issues.
    NOTE: For additional information, look for [ActivityId] 1e4d6f55-8379-0000-3191-4d1e7983d301 in the Event Log or use
    the command line Get-AppxLog -ActivityID 1e4d6f55-8379-0000-3191-4d1e7983d301
    At line:1 char:1
    + Add-AppxPackage -Path "C:\Users\mabel\Downloads\Ganache.appx"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : NotSpecified: (C:\Users\mabel\Downloads\Ganache.appx:String) [Add-AppxPackage], Exceptio
       n
        + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.AddAppxPackageCommand

我深入了解诊断并运行命令Get-AppxLog -ActivityID 1e4d6f55-8379-0000-3191-4d1e7983d301,并获得以下日志详细信息:

Time                      ID           Message
----                      --           -------
1/1/2018 8:13:38 PM       301          The calling process is powershell.exe
1/1/2018 8:13:38 PM       603          Started deployment Add operation on a package with main parameter: Ganache.appx and
                                       Options: 0. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
                                       deployment issues.
1/1/2018 8:13:41 PM       157          The app package signature was validated for core content of the app package published
                                       by CN=Consensys Inc, O=Consensys Inc, L=New York, S=New York, C=US. Payload won't be
                                       validated until the files are read.
1/1/2018 8:13:42 PM       170          The streaming reader was created successfully for app package
                                       Ganache_1.0.1.0_x64__zh355ej5cj694.
1/1/2018 8:13:42 PM       10002        Creating Resiliency File C:\ProgramData\Microsoft\Windows\AppRepository\edc8d325-87ef-
                                       46b9-93c2-cf029ff3f8f4_S-1-5-21-2104190792-3376611798-3824734217-1001_1.rslc for Add
                                       Operation on Package Ganache_1.0.1.0_x64__zh355ej5cj694.
1/1/2018 8:13:42 PM       607          Deployment Add operation on package Ganache_1.0.1.0_x64__zh355ej5cj694 has been
                                       de-queued and is running for user DESKTOP-8NHB92D\mabel.
1/1/2018 8:13:42 PM       613          Adding uri to the list of Uris: file:///C:/Users/mabel/Downloads/Ganache.appx.
1/1/2018 8:13:42 PM       605          The last successful state reached was BundleProcessed. Failure occurred before
                                       reaching the next state Indexed.
1/1/2018 8:13:42 PM       401          Deployment Add operation with target volume C: on Package
                                       Ganache_1.0.1.0_x64__zh355ej5cj694 from:  (Ganache.appx)  failed with error
                                       0x80073CFD. See http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app
                                       deployment issues.
1/1/2018 8:13:42 PM       404          AppX Deployment operation failed for package Ganache_1.0.1.0_x64__zh355ej5cj694 with
                                       error 0x80073CFD. The specific error text for this failure is: Deployment Add
                                       operation with target volume C: on Package Ganache_1.0.1.0_x64__zh355ej5cj694 from:
                                       (Ganache.appx)  failed with error 0x80073CFD. See
                                       http://go.microsoft.com/fwlink/?LinkId=235160 for help diagnosing app deployment
                                       issues.

Windows论坛建议我确保Windows完全更新,上次我更新它是一小时前。

从错误链接中可以看出“无法满足指定的安装先决条件”。我有安装和运行testrpc / ganache cmd行的所有先决条件。在安装Ganache UI之前是否需要采取任何步骤?

3 个答案:

答案 0 :(得分:1)

我收到同样的错误,因为我的Windows版本没有更新。

以zip文件的形式打开.appx文件 在根目录中是一个文件:AppxManifest.xml

有一个关于先决条件的可选部分。 但在此之前是具有最小Windows版本的依赖项。 Select A.ID From #T1 A Cross Apply ( values ((Select A.* for XML RAW) )) B(XMLData) Group by A.ID Having min(XMLData)<>max(XMLData)

然后我检查了powershell以获得我的点版本:

ID
1
4

14316&gt; 10240,所以我的操作系统太旧了。

答案 1 :(得分:1)

您可以下载ganache源并自行构建 https://github.com/trufflesuite/ganache

  1. 克隆此回购
  2. 运行npm install
  3. 运行npm start

答案 2 :(得分:0)

如果需要可执行文件,将找到名为ganache-setup-1.3.0.exe的可执行文件here