dotnet restore failed on Ubuntu 16.04
See original GitHub issueSteps to reproduce
- on clean VM, sudo apt-get install unzip libunwind8 gettext libicu-dev liblttng-ust-dev libcurl4-openssl-dev libssl-dev uuid-dev
- wget -O ~/20170505-dotnet-dev-linux-x64.latest.tar.gz https://dotnetcli.blob.core.windows.net/dotnet/Sdk/release/2.0.0/dotnet-dev-linux-x64.latest.tar.gz
- mkdir -p ~/20170505
- tar -xf 20170505-dotnet-dev-linux-x64.latest.tar.gz -C ~/20170505/
- export PATH=~/20170505:$PATH
- dotnet --info
- mkdir -p ~/HelloWorld
- cd ~/HelloWorld
- dotnet new console
Expected behavior
Create project successfully and restore succeeded
Actual behavior
e2euser@E2E-Ubuntu1604s:~/HelloWorld$ dotnet new console The template “Console Application” was created successfully.
Processing post-creation actions… Running ‘dotnet restore’ on /home/e2euser/HelloWorld/HelloWorld.csproj… Restore failed. Output from command: Restoring packages for /home/e2euser/HelloWorld/HelloWorld.csproj… /home/e2euser/20170505/sdk/2.0.0-preview1-005957/NuGet.targets(97,5): error : Un able to load the service index for source https://dotnet.myget.org/F/dotnet-core /api/v3/index.json. [/home/e2euser/HelloWorld/HelloWorld.csproj] /home/e2euser/20170505/sdk/2.0.0-preview1-005957/NuGet.targets(97,5): error : The type initializer for ‘System.Net.Http.CurlHandler’ threw an exception. [/hom e/e2euser/HelloWorld/HelloWorld.csproj] /home/e2euser/20170505/sdk/2.0.0-preview1-005957/NuGet.targets(97,5): error : The type initializer for ‘Http’ threw an exception. [/home/e2euser/HelloWorld/He lloWorld.csproj] /home/e2euser/20170505/sdk/2.0.0-preview1-005957/NuGet.targets(97,5): error : The type initializer for ‘HttpInitializer’ threw an exception. [/home/e2euser/He lloWorld/HelloWorld.csproj] /home/e2euser/20170505/sdk/2.0.0-preview1-005957/NuGet.targets(97,5): error : Unable to load DLL ‘System.Net.Http.Native’: The specified module or one of its dependencies could not be found. [/home/e2euser/HelloWorld/HelloWorld.csproj] /home/e2euser/20170505/sdk/2.0.0-preview1-005957/NuGet.targets(97,5): error : (Exception from HRESULT: 0x8007007E) [/home/e2euser/HelloWorld/HelloWorld.cspro j]
Post action failed. Description: Restore NuGet packages required by this project. Manual instructions: Run ‘dotnet restore’
Environment data
dotnet --info
output:
.NET Command Line Tools (2.0.0-preview1-005957)
Product Information: Version: 2.0.0-preview1-005957 Commit SHA-1 hash: 056ac0e9cd
Runtime Environment: OS Name: ubuntu OS Version: 16.04 OS Platform: Linux RID: ubuntu.16.04-x64 Base Path: /home/e2euser/20170505/sdk/2.0.0-preview1-005957/
Microsoft .NET Core Shared Framework Host
Version : 2.0.0-preview1-002111-00 Build : 1ff021936263d492539399688f46fd3827169983
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (3 by maintainers)
Top GitHub Comments
fixed by re-installing apt-get install libcurl4-openssl-dev. Will verify it on next version.
We got a green light on the test. So, closing this issue.