Installing Ganache.appx on Windows 10 - powershell

I am using the following command in PowerShell to install Truffle's Ganache on my Windows 10 machine:
Add-AppxPackage -Path "C:\Users\mabel\Downloads\Ganache.appx"
Whenever I run that command I get the following error:
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
I digged a bit deeper for a diagnosis and ran the command Get-AppxLog -ActivityID 1e4d6f55-8379-0000-3191-4d1e7983d301, and got the following log details:
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.
The windows forum recommended me to make sure Windows is fully updated, the last time I updated it was an hour ago.
From the link in the error it says "A specified install prerequisite couldn't be satisfied." I have all the prerequisites to install and run testrpc/ganache cmd line. Are there any steps I need to take before installing Ganache UI?

I got the same error, because my windows version was not updated.
Open the .appx file as a zip file
In the root is a file: AppxManifest.xml
There is an optional section on prerequisites.
But before that is a dependencies entry with a minimum windows version.
<Dependencies>
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14316.0" MaxVersionTested="10.0.14316.0" />
</Dependencies>
Then I checked in powershell to get my dot version:
PS C:\Users\XXXXX\> [System.Environment]::OSVersion.Version
Major Minor Build Revision
----- ----- ----- --------
10 0 10240 0
14316 > 10240, so my OS is too old.

In case you want an executable file, You will find an executable file here, named ganache-setup-1.3.0.exe

You can download a ganache source and build it by yourself
https://github.com/trufflesuite/ganache
Clone this repo
Run npm install
Run npm start

Related

Terraform - Unable to intiate terraform

I am trying to initiate terraform on visual studio code - insiders.
Points:
I have downloaded the terraform executable file and i am able to launch it on command prompt.
When to run the command terraform init command on visual studio code - insider i get the following error message. Please find the error message below and also the location of the terraform index.
PS F:\terraform> terraform.exe init
Fatal error in launcher: Unable to create process using
'"c:\python38\python.exe" "c:\Python38\Scripts\terraform.exe" init':
the system cannot find the file specified.
PS F:\terraform> ls
Directory: F:\terraform
Mode LastWriteTime Length Name
---- ------------- ------ ----
d---- 18-09-2021 22:21 .terraform
-a--- 18-09-2021 22:33 1035 .terraform.lock.hcl
-a--- 18-09-2021 22:48 219 main.tf
-a--- 18-09-2021 22:48 41 provider.tf
----- 18-09-2021 23:44 80807800 terraform.exe
I have tried to run the same code ps core 6 i get the above error message in the command prompt it works perfectly.
I really your inputs on what can be done.
Please help
Regards
Sudlo
Here the steps which I performed to fix the issue.
I launched PS core prompt went into the directory in my case
f:\terrform and passed the command terraform init I got the same error message.
went into the location C:\Python38\Scripts and located the terraform executable file deleted the file and copied it again and performed initialization command. This time there was no error.
Hope this helps

Unable to configure a new agent : Failed to create CoreCLR, HRESULT: 0x80004005

We had some 12 agents (vsts-agent-linux-x64-2.188.4) running on one Az VM (Ubuntu 20.04.2 LTS) as processes (./config.sh && screen ./run.sh). All was well..
I had to run some command related to /tmp folder but it kept showing busy and we suspected that our Agents might be using /tmp. Unfortunately instead of any other clean way of stopping the agents, we killed all processes on this VM manually, including the agents'.
After the /tmp related command ran successfully, I tried running screen ./run.sh from one of the agent directories. And I got an error:
Failed to create CoreCLR, HRESULT: 0x80004005
I also had tried :
.agent2/run.sh and I got the error :
ldd: ./bin/libcoreclr.so: No such file or directory
ldd: ./bin/System.Security.Cryptography.Native.OpenSsl.so: No such file or directory
ldd: ./bin/System.IO.Compression.Native.so: No such file or directory
ldd: ./bin/System.Net.Http.Native.so: No such file or directory
Failed to create CoreCLR, HRESULT: 0x80004005
I even downloaded a new .tar for the agent and ran a fresh ./config . But I get the same error on ./config as well
Is there a solution to this? Please help
export COMPlus_EnableDiagnostics = 0, and then running ./config from the agent directory. worked!
I had this issue when running as the non-privileged user specified in the systemd file but running as root user worked fine.
Finally used:
strace -f -o trace.log /<executable path>/<executable name>
Which led me to:
9183 mknod("/tmp/clr-debug-pipe-9183-8112345738-in", S_IFIFO|0700) = -1 EACCES (Permission denied)
This caused me to compare the /tmp directory between working and non-working boxes.
[<not-working-hostname>]$ ll /
drwxrwxr-x 7 root root 93 Jan 5 21:37 tmp
[<working-hostname>]$ ll /
drwxrwxrwt 7 root root 93 Jan 5 21:59 tmp
(Note the r-x vs rwt)
Fix:
[<hostname>]# chmod 1777 /tmp

Kernel compilation fails due to PF_MAX > 44

I have a QEMU VM running an image of the Linux kernel 4.14.78.
On the host machine (a server with 96 cores), I am trying to compile a new update for the kernel with some changes I have made.
To make this process faster, I was using the host machine to compile for the target VM.
To do that I follow these steps:
copy the /boot/config-4.14.78 file from VM to host
put the copied file into the kernel source-code root directory, renaming it to .config in my
run make clean to clean it
run make menuconfig just to update the configs
run make -j$(nproc)
However, I am getting this error:
AS arch/x86/purgatory/setup-x86_64.o
CC arch/x86/purgatory/sha256.o
AS arch/x86/purgatory/entry64.o
CC arch/x86/purgatory/string.o
In file included from scripts/selinux/mdp/mdp.c:49:
./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please update secclass_map.
245 | #error New address family defined, please update secclass_map.
| ^~~~~
make[3]: *** [scripts/Makefile.host:102: scripts/selinux/mdp/mdp] Error 1
make[2]: *** [scripts/Makefile.build:587: scripts/selinux/mdp] Error 2
make[2]: *** Waiting for unfinished jobs....
In file included from scripts/selinux/genheaders/genheaders.c:19:
./security/selinux/include/classmap.h:245:2: error: #error New address family defined, please update secclass_map.
245 | #error New address family defined, please update secclass_map.
| ^~~~~
CHK scripts/mod/devicetable-offsets.h
make[3]: *** [scripts/Makefile.host:102: scripts/selinux/genheaders/genheaders] Error 1
make[2]: *** [scripts/Makefile.build:587: scripts/selinux/genheaders] Error 2
make[1]: *** [scripts/Makefile.build:587: scripts/selinux] Error 2
make[1]: *** Waiting for unfinished jobs....
I have checked what causes this, and turns out that it is because of the:
include/linux/socket.h:211:#define AF_MAX 44 /* For now.. */
include/linux/socket.h:260:#define PF_MAX AF_MAX
Then, I followed this solution to print out the definition of PF_MAX at preprocessing time, and turns out that the PF_MAX is 45:
In file included from scripts/selinux/mdp/mdp.c:49:
./security/selinux/include/classmap.h:247:9: note: #pragma message: 45
247 | #pragma message(STRING(PF_MAX))
| ^~~~~~~
./security/selinux/include/classmap.h:250:2: error: #error New address family defined, please update secclass_map.
250 | #error New address family defined, please update secclass_map.
| ^~~~~
This 45 makes no sense for me, because I just checked that it is supposed to be 44.
I wonder if the build is considering the host machine instead of the target?
P.S.: These steps works fine on my local machine, which is a 8-cores machine, look the kernel version:
uname -a
Linux campes-note 5.4.86 #1 SMP Fri Jan 1 16:26:25 -03 2021 x86_64 x86_64 x86_64 GNU/Linux
UPDATE 1:
I tried to compile the kernel without any of my changes, following th above steps mentioned, and it did not compile as well, I get the same error.
UPDATE 2:
I found out that somehow, the compilation is looking at the host /usr/src/linux-headers-x.x.x files.
Instead, it should point to the same version as the target.
For that, I tried to follow this tutorial but I did not success. I am having a problem in one of the steps stated on this tutorial.
(Gathered from the now removed comments)
I have tried myself to build myself v4.14.78 followed by the latest available v4.14.214. I have found that former fails while the latter builds. So, I have bisected down to v4.14.116 that first builds correctly. Then I simple looked into the changes and found commit 760f8522ce08 ("selinux: use kernel linux/socket.h for genheaders and mdp") in the Linux stable tree which fixes the issue.
You may try to cherry-pick it to your branch and compile again.

MDT 2012 image Failure - Unable to find Imagex.exe

I am running Windows Server 2012 R2 with MDT 2012, I installed the Windows 8 ADK before installing MDT 2012. I have created my Deployment Share and set everything up, but when I try to run the build it fails. I have included the error log bellow;
FindFile: The file imagex.exe could not be found in any standard locations. LTIApply 01/06/2015 09:54:30 0 (0x0000)
FAILURE ( 5441 ): 1: FindFile: imagex.exe LTIApply 01/06/2015 09:54:30 0 (0x0000)
Command completed, return code = -2147467259 LiteTouch 01/06/2015 09:54:30 0 (0x0000)
Litetouch deployment failed, Return Code = -2147467259 0x80004005 LiteTouch 01/06/2015 09:54:30 0 (0x0000)
For more information, consult the task sequencer log ...\SMSTS.LOG. LiteTouch 01/06/2015 09:54:30 0 (0x0000)
I see that it is unable to find the 'imagex.exe' file, where should this be located, and can I copy the file to the directory?
Any ideas?
Kind Regards,
Copy imagex.exe and wimgapi.dll (this may be optional, but I would still copy it) from the installation of ADK to the Tools\x86 and Tools\x64 directories in your deployment share.
For example (using 8.1 ADK instead of 8 ADK, folder names may be slightly different) the default installation on Server 2012 R2 would be "C:\Program Files (x86)\Windows Kit\8.1\Assessment and Deployment Kit\Deployment Tools\amd64\DISM" for the 64-bit imagex.exe and wimgapi.dll files. And "C:\Program Files (x86)\Windows Kit\8.1\Assessment and Deployment Kit\Deployment Tools\x86\DISM" for the 32-bit imagex.exe and wimgapi.dll files.
These files would be copied to the appropriate folders in C:\DeploymentShare\Tools\x64 and C:\DeploymentShare\Tools\x86.
This should resolve your problem. For whatever reason, MDT sometimes does not place all the needed files into the Tools folder when you create a deployment share.

vscode install failed with "install failed error" on windows7

I try to install vscode on windows7 and get "install failed error", no detailed information, is there someone get the same error? It is crazy that vscode can not be installed on windows.
Use something like 7Zip to extract the archived files to a VSCodeSetup folder, with the resulting files:
Mode LastWriteTime Length Name
---- ------------- ------ ----
----- 4/22/2015 8:28 AM 140782 background.gif
----- 4/27/2015 6:22 PM 60255967 Code-0.1.0-full.nupkg
----- 4/27/2015 6:22 PM 74 RELEASES
-a--- 4/30/2015 9:25 AM 1911 SquirrelSetup.log
----- 4/24/2015 11:12 AM 1492992 Update.exe
Then open PowerShell (a CMD window would also work). I cd'd into the VSCodeSetup folder and ran the following command:
PS>.\Update.exe --install=.
(You may need to run PS or the CMD window as Administrator)
Referenced post: VSCode Installation Failed - Failed to extract installer