Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Exception at creating System.Net.Http.HttpClient without libcurl3 in ubuntu-16.04 #1937

Copy link
Copy link
@itn3000

Description

@itn3000
Issue body actions

Steps to reproduce

  1. create minimum ubuntu-16.04 env with vagrant
  2. do https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md#ubuntu-1604
  3. run powershell
  4. 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

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productWG-Maintainers-Buildspecific to affecting the buildspecific to affecting the build

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.