4

我在 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 之前我需要采取什么步骤吗?

4

3 回答 3

2

我得到了同样的错误,因为我的 windows 版本没有更新。

将 .appx 文件作为 zip 文件打开 在根目录中有一个文件:AppxManifest.xml

有一个关于先决条件的可选部分。但在此之前是具有最低 Windows 版本的依赖项条目。 <Dependencies> <TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.14316.0" /> </Dependencies>

然后我检查了 powershell 以获取我的 dot 版本:

PS C:\Users\XXXXX\> [System.Environment]::OSVersion.Version

Major  Minor  Build  Revision
-----  -----  -----  --------
10     0      10240  0

14316 > 10240,所以我的操作系统太旧了。

于 2018-01-30T16:23:29.717 回答
2

如果你想要一个可执行文件,你会在这里找到一个可执行文件,名为ganache-setup-1.3.0.exe

于 2019-02-11T08:55:35.207 回答
1

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

  1. 克隆这个 repo
  2. 运行 npm 安装
  3. 运行 npm start
于 2018-03-07T12:40:00.707 回答