Steps to reproduce
create minimum ubuntu-16.04 env with vagrant
do https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#ubuntu-1604
run powershell
execute New-Object System.Net.Http.HttpClient
Expected behavior
output the following text
DefaultRequestHeaders BaseAddress Timeout MaxResponseContentBufferSize
--------------------- ----------- ------- ----------------------------
{} 00:01:40 2147483647
Actual behavior
occured following exception
New-Object : Exception calling ".ctor" with "0" argument(s): "The type
initializer for 'System.Net.Http.CurlHandler' threw an exception."
At line:1 char:1
+ New-Object System.Net.Http.HttpClient
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvoca
tionException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
Shell.Commands.NewObjectCommand
and do not work the PowerShellGet module commands(Find-Module,Install-Module,etc)
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.0 .0 - alpha
PSEdition Core
PSCompatibleVersions {1.0 , 2.0 , 3.0 , 4.0 ...}
BuildVersion 3.0 .0.0
GitCommitId v6.0.0 - alpha.9
CLRVersion
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1 .0.1
Finally,I resolved it by installing libcurl3 package by apt-get.
I guess it is caused by dependency of System.Net.Http.CurlHandler.
Reactions are currently unavailable
Steps to reproduce
New-Object System.Net.Http.HttpClientExpected behavior
output the following text
Actual behavior
occured following exception
and do not work the PowerShellGet module commands(Find-Module,Install-Module,etc)
Environment data
Finally,I resolved it by installing
libcurl3package by apt-get.I guess it is caused by dependency of System.Net.Http.CurlHandler.