question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dotnet restore failed on Ubuntu 16.04

See original GitHub issue

Steps to reproduce

  1. on clean VM, sudo apt-get install unzip libunwind8 gettext libicu-dev liblttng-ust-dev libcurl4-openssl-dev libssl-dev uuid-dev
  2. 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
  3. mkdir -p ~/20170505
  4. tar -xf 20170505-dotnet-dev-linux-x64.latest.tar.gz -C ~/20170505/
  5. export PATH=~/20170505:$PATH
  6. dotnet --info
  7. mkdir -p ~/HelloWorld
  8. cd ~/HelloWorld
  9. 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:closed
  • Created 6 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shimingsgcommented, May 15, 2017

fixed by re-installing apt-get install libcurl4-openssl-dev. Will verify it on next version.

0reactions
livarcocccommented, May 15, 2017

We got a green light on the test. So, closing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

dotnet restore fails on Ubuntu 16.04 #8667 - NuGet/Home
Dotnet restore just hangs. Reverting back to my old core 2.2 version worked. I tried using a brand new Ubuntu Server 16.04 image...
Read more >
Dotnet restore fails on Ubuntu 16.04 server in Dockerfile ...
When the dotnet restore command is run either inside Dockerfile or in ubuntu shell on host, the following error is displayed:
Read more >
Dotnet restore failed on .net core 3.1 - C#
I stumbled on your question, and I think I'm able to help. The error message from the dotnet restore is the line More...
Read more >
dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >
Dotnet restore vs nuget restore. Share. In my code repo, there
A flag for dotnet restore that exits immediately with non-zero code if the any package fails to restore, e. We tried upgrading the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found