I am trying to download and execute an installer (of Boost 1.74) on Windows PowerShell for a CI system:
I am using Invoke-WebRequest
and after that simply execute the program.
However it tells me that file is corrupt.
I tried several times and I don’t think the file is corrupt but perhaps there is a problem with the permissions.
$ Invoke-WebRequest 'https://downloads.sourceforge.net/project/boost/boost-binaries/1.74.0/boost_1_74_0-msvc-14.2-64.exe' -OutFile 'boost_1_74_0-msvc-14.2-64.exe'
$ ./boost_1_74_0-msvc-14.2-64.exe
Program 'boost_1_74_0-msvc-14.2-64.exe' failed to run: The file or directory is corrupted and unreadableAt line:323
char:1
+ ./boost_1_74_0-msvc-14.2-64.exe
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
At line:323 char:1
+ ./boost_1_74_0-msvc-14.2-64.exe
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
How can I make sure the installer is executed here? What am I doing wrong?