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 fails on Linux 4.6.2

See original GitHub issue

Steps to reproduce

CentOS 7 with kernel-ml installed, the mainline Linux kernel at version 4.6.2.

./dotnet-install.sh -c preview -v 1.0.0-preview2-003121
~/.dotnet/dotnet restore

Expected behavior

Packages to be restored.

Actual behavior

Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
Decompressing 100% 2175 ms
Expanding 3%Segmentation fault (core dumped)

Environment data

dotnet --info output:

dotnet --info
.NET Command Line Tools (1.0.0-preview2-003121)

Product Information:
 Version:            1.0.0-preview2-003121
 Commit SHA-1 hash:  1e9d529bc5

Runtime Environment:
 OS Name:     centos
 OS Version:  7
 OS Platform: Linux
 RID:         centos.7-x64

This is a fresh CentOS 7 machine I made to replace the Debian Testing machine I couldn’t build on in dotnet/sdk#6483.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:109 (58 by maintainers)

github_iconTop GitHub Comments

4reactions
NinoFloriscommented, Aug 25, 2016

And this here is exactly why we have been pleading for an official fix. It cannot be reasonably expected for normal users to compile some native app from source and repackage it with all the tooling to create a fix for themselves.

Every day this stays unresolved it gets more embarrassing. And it starts to become writing on the wall for our trust concerning swift resolve the next time an issue like this comes up.

It has been more than a few weeks ago since I got the coreclr guys to push the fix into the main branch and it has been more than 3 months ago since similar issues started to crop up.

Is this what we’ll have to get used to when it comes to support for a now opensource .net? As we as a community cannot change the links on http://dot.net to point to a new release, or even create a release for that matter. Either do full public community governance or be prepared to do this kind of work yourself within a normal timeframe.

It amazes me, really…

3reactions
yetanotherchriscommented, Aug 27, 2016

Thanks @viktorbk that has helped resolve the issue/work around it. If anyone uses Gitlab (or maybe other CI services that use YAML), this is my definition:

job_build_dotnet:
       stage: build
       image: microsoft/dotnet:latest
       script:
         - apt-get update
         - apt-get install unzip
         - mkdir tmp-update && cd tmp-update
         - wget https://www.nuget.org/api/v2/package/runtime.ubuntu.14.04-x64.Microsoft.NETCore.Runtime.CoreCLR/1.0.4
         - mv 1.0.4 tmp.zip
         - unzip tmp.zip
         - cp ./runtimes/ubuntu.14.04-x64/lib/netstandard1.0/* /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0
         - cp ./runtimes/ubuntu.14.04-x64/native/* /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.0
         - cd ..
         - dotnet restore
         - dotnet publish src/FakeNameHere.Web
       artifacts:
         expire_in: 12 hrs
         paths:
          - src/FakeNameHere.Web/bin/Debug/netcoreapp1.0/publish/

job_build_docker:
       stage: deploy
       image: docker:latest
       services:
        - docker:dind
       script:
        - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN registry.gitlab.com/yetanotherchris/FakeNameHere 
        - docker build -t registry.gitlab.com/yetanotherchris/FakeNameHere:latest .
        - docker push registry.gitlab.com/yetanotherchris/FakeNameHere:latest
       dependencies:
        - job_build_dotnet
Read more comments on GitHub >

github_iconTop Results From Across the Web

I'm attempting to build a .net application on linux and when ...
I set the TargetVersion in the .csproj to net60 and when I do a dotnet restore to get the nuget packages it gets...
Read more >
Unable to resolve error when try dotnet restore multi project ...
i`ve got simular problem. Solve that by manually swap project order in solution file. ... NET Core class library. It worked for me....
Read more >
dotnet restore command - .NET CLI
Learn how to restore dependencies and project-specific tools with the dotnet restore command.
Read more >
dotnet publish command - .NET CLI
The dotnet restore command is still useful in certain scenarios where explicitly restoring makes sense, such as continuous integration builds in ...
Read more >
Dotnet restore not working
dotnet Version: 1.1.0 (global.json); NuGet Version : 4.4.1.4656; VS2017 v15.5.2 (as Administrator) .NET Core 1.1; The solution I am trying to build.
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