I've followed this guide https://www.microsoft.com/net/core#ubuntu step by step
restore the packages
When running dotnet restore
I get the following info (note the segmentation fault at the end)
log : Restoring packages for /root/hwapp/project.json...
info : CACHE https://api.nuget.org/v3-flatcontainer/system.appcontext/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.appcontext/4.1.0-rc2-24027/system.appcontext.4.1.0-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.collections/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.collections/4.0.11-rc2-24027/system.collections.4.0.11-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.collections.concurrent/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.collections.concurrent/4.0.12-rc2-24027/system.collections.concurrent.4.0.12-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.console/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.console/4.0.0-rc2-24027/system.console.4.0.0-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.diagnostics.debug/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.diagnostics.debug/4.0.11-rc2-24027/system.diagnostics.debug.4.0.11-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.diagnostics.tools/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.diagnostics.tools/4.0.1-rc2-24027/system.diagnostics.tools.4.0.1-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.globalization/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.globalization/4.0.11-rc2-24027/system.globalization.4.0.11-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.xml.readerwriter/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.xml.readerwriter/4.0.11-rc2-24027/system.xml.readerwriter.4.0.11-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethostresolver/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethostresolver/1.0.1-rc2-002702-00/microsoft.netcore.dotnethostresolver.1.0.1-rc2-002702-00.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethost/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.win32.primitives/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.win32.primitives/4.0.1-rc2-24027/microsoft.win32.primitives.4.0.1-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.security.cryptography.x509certificates/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.security.cryptography.x509certificates/4.1.0-rc2-24027/system.security.cryptography.x509certificates.4.1.0-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.threading.tasks.parallel/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.threading.tasks.parallel/4.0.1-rc2-24027/system.threading.tasks.parallel.4.0.1-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.threading.thread/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.threading.thread/4.0.0-rc2-24027/system.threading.thread.4.0.0-rc2-24027.nupkg
info : CACHE https://api.nuget.org/v3-flatcontainer/system.threading.threadpool/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/system.threading.threadpool/4.0.10-rc2-24027/system.threading.threadpool.4.0.10-rc2-24027.nupkg
log : Installing System.Xml.ReaderWriter 4.0.11-rc2-24027.
log : Installing System.Diagnostics.Tools 4.0.1-rc2-24027.
log : Installing System.Console 4.0.0-rc2-24027.
log : Installing System.Collections.Concurrent 4.0.12-rc2-24027.
log : Installing System.AppContext 4.1.0-rc2-24027.
log : Installing Microsoft.Win32.Primitives 4.0.1-rc2-24027.
log : Installing Microsoft.NETCore.DotNetHostResolver 1.0.1-rc2-002702-00.
log : Installing System.Globalization 4.0.11-rc2-24027.
log : Installing System.Diagnostics.Debug 4.0.11-rc2-24027.
log : Installing System.Collections 4.0.11-rc2-24027.
log : Installing System.Threading.ThreadPool 4.0.10-rc2-24027.
log : Installing System.Threading.Thread 4.0.0-rc2-24027.
log : Installing System.Threading.Tasks.Parallel 4.0.1-rc2-24027.
log : Installing System.Security.Cryptography.X509Certificates 4.1.0-rc2-24027.
Segmentation fault
dotnet --info output:
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: ubuntu
OS Version: 14.04
OS Platform: Linux
RID: ubuntu.14.04-x64
@ahmad-moussawi do you have a repro project.json? We run quite a bit of restore operations on Ubuntu 14.04 x64 and I've not seen this symptom before. let's see if I can get a repro.
@schellap
After many trial, The restore succeeded on the HelloWorld app, I retried on my original app, I got the same error.
the project.json of my app
{
"title": "Web Application",
"userSecretsId": "aspnet-Web-43c922f-cf62-4d31-bref3-74d564e3752d9",
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.0.0-rc2-3002702",
"type": "platform"
},
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Mvc": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview1-final",
"type": "build"
},
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-rc2-final",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-rc2-final",
"Microsoft.EntityFrameworkCore.Sqlite": "1.0.0-rc2-final",
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview1-final",
"type": "build"
},
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc2-final",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc2-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc2-final",
"Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0-rc2-final",
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview1-final",
"type": "build"
},
"Microsoft.VisualStudio.Web.CodeGenerators.Mvc": {
"version": "1.0.0-preview1-final",
"type": "build"
},
"Microsoft.AspNetCore.Session": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Cors": "1.0.0-rc2-final",
"Microsoft.AspNetCore.Owin": "1.0.0-rc2-final",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-final"
},
"tools": {
"Microsoft.AspNetCore.Razor.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
},
"Microsoft.AspNetCore.Server.IISIntegration.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
},
"Microsoft.EntityFrameworkCore.Tools": {
"version": "1.0.0-preview1-final",
"imports": [
"portable-net45+win8+dnxcore50",
"portable-net45+win8"
]
},
"Microsoft.Extensions.SecretManager.Tools": {
"version": "1.0.0-preview1-final",
"imports": "portable-net45+win8+dnxcore50"
},
"Microsoft.VisualStudio.Web.CodeGeneration.Tools": {
"version": "1.0.0-preview1-final",
"imports": [
"portable-net45+win8+dnxcore50",
"portable-net45+win8"
]
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": [
"dotnet5.6",
"dnxcore50",
"portable-net45+win8"
]
}
},
"buildOptions": {
"emitEntryPoint": true,
"preserveCompilationContext": true
},
"runtimeOptions": {
"gcServer": true
},
"publishOptions": {
"include": [
"wwwroot",
"Views",
"config.json",
"web.config"
]
},
"scripts": {
"prepublish": [
],
"postpublish": [
]
},
"tooling": {
"defaultNamespace": "Forecast"
}
}
@piotrpMSFT this happening after generating a new project HelloWorld app using dotnet new, below is the content of the project.json file, but really I think it's not the cause, maybe the dotnet is not installed correctly, or it's conflicting with the old dnx
{
"version": "1.0.0-*",
"buildOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-rc2-3002702"
}
},
"frameworks": {
"netcoreapp1.0": {
"imports": "dnxcore50"
}
}
}
I was installing the previous dnx, maybe some kind of conflict ?
I seem to be getting the same error on debian stable+unstable (again, with the Hello World app):
~/dotnet/dotnet --verbose --info --version
.NET Command Line Tools (1.0.0-preview1-002702)
Product Information:
Version: 1.0.0-preview1-002702
Commit Sha: 6cde21225e
Runtime Environment:
OS Name: debian
OS Version:
OS Platform: Linux
RID: debian.-x64
localhost:~$ ~/dotnet/dotnet restore
Segmentation fault (core dumped)
localhost:~$
(It doesn't actually dump any of the stacktrace annyoingly)
I also had trouble even getting it this far, as previously it wouldn't run because of missing libcurl, and I had to install that:
localhost:~/hwapp$ aptitude versions libcurl4-openssl-dev
Package libcurl4-openssl-dev:
p 7.38.0-4+deb8u3 stable 500
iB 7.47.0-1 unstable 500
Package libcurl4-openssl-dev:i386:
p 7.38.0-4+deb8u3 stable 500
p 7.47.0-1 unstable 500
After getting rid of the unstable version and installing the one from stable it got going again, so it looks like just an incopatible libcurl issue, though I did run dotnet restore --disable-parallel but that was just me being paranoid.
I'm experiencing this same issue with the microsoft/dotnet:latest docker image. Below is how I reproduce the issue.
~$ git clone https://github.com/aspnet/cli-samples.git src/aspnet-cli_samples && cd src/aspnet-cli_samples
~/src/aspnet-cli_samples$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
microsoft/dotnet latest f315e6bbb53f 13 hours ago 641.1 MB
~/src/aspnet-cli_samples$ docker run -it -p ::5000 -v="${PWD}:/$(basename ${PWD})" -v="${HOME}/.local/share/NuGet:/root/.local/share/NuGet" -v="${HOME}/.nuget:/root/.nuget" -w="/$(basename ${PWD})" --security-opt seccomp:unconfined microsoft/dotnet:latest
root@375a5609b560:/aspnet-cli_samples# dotnet --version
1.0.0-preview1-002702
root@375a5609b560:/aspnet-cli_samples# dotnet restore
log : Restoring packages for /aspnet-cli_samples/HelloMvcApi/project.json...
log : Restoring packages for /aspnet-cli_samples/HelloMvc/project.json...
log : Restoring packages for /aspnet-cli_samples/HelloWeb/project.json...
log : Restoring packages for /aspnet-cli_samples/HelloWebFull/project.json...
info : GET https://api.nuget.org/v3-flatcontainer/newtonsoft.json/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http.extensions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.hosting/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.http/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.diagnostics/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.numerics.vectors/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.buffers/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.httpoverrides/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.options/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.logging.abstractions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/libuv/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.platformabstractions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.security.principal.windows/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.collections/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.debug/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.globalization/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.io/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.net.primitives/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.runtime.interopservices/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.runtime.extensions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.text.encoding/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading.tasks/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading.thread/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading.threadpool/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading.timer/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.staticfiles/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.extensions.configuration.abstractions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.console/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.csharp/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.codeanalysis.visualbasic/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.csharp/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.netcore.dotnethostpolicy/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.visualbasic/index.json
info : GET https://api.nuget.org/v3-flatcontainer/netstandard.library/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.collections.immutable/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.componentmodel/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.componentmodel.annotations/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.diagnosticsource/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.diagnostics.process/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.dynamic.runtime/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.globalization.extensions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.io.filesystem.watcher/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.io.unmanagedmemorystream/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.io.memorymappedfiles/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.linq.expressions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.linq.queryable/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.linq.parallel/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.net.nameresolution/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.net.requests/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.net.security/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.net.webheadercollection/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.reflection.dispatchproxy/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.reflection.metadata/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.resources.reader/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.reflection.typeextensions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.runtime.loader/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.security.cryptography.algorithms/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.security.cryptography.encoding/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.security.cryptography.primitives/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading.tasks.dataflow/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.security.cryptography.x509certificates/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.threading.tasks.parallel/index.json
info : GET https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc.core/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.collections.concurrent/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.componentmodel.typeconverter/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.linq/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.reflection.extensions/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.runtime.serialization.primitives/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.resources.resourcemanager/index.json
info : GET https://api.nuget.org/v3-flatcontainer/system.text.encoding.extensions/index.json
Segmentation fault (core dumped)
I tried the same thing but with a Debian stable Docker image (built following https://wiki.debian.org/Cloud/CreateDockerImage) and the instructions at get.asp.net for installing on Debian 8.2 Linux (https://www.microsoft.com/net/core#debian). I get the same results: the dotnet executable segfaults. It's exiting with code 139, if that's any help.
I'm hitting the same problem, and have manually resolved all the dependencies based on that Ubuntu package information. I get a segfault immediately, the feeds aren't even touched.
$ dotnet --info
.NET Command Line Tools (1.0.0-preview2-002913)
Product Information:
Version: 1.0.0-preview2-002913
Commit SHA-1 hash: b1b7caac3d
Runtime Environment:
OS Name: debian
OS Version:
OS Platform: Linux
RID: debian.-x64
Installed via the obtain script.
@andschwa and I looked into this and there were few things that we observed:
dotnet --info from all the above reports.debian.-x64.corerun NuGet.XPlat.CommandLine.dll restore, so we can eliminate the dotnet hostlibcryptoProblem was resolved by downgrading to libcurl3=7.38.0 (Jessie's version), per @tomciaaa's suggestion (after reading the last sentence carefully).
I should add that in order to restore an app successfully when on Debian Testing, you need to trick NuGet into thinking you're on a supported runtime. I did this by adding VERSION_ID=8.2 to /etc/os-release so I could restore for RID debian.8.2-x64.
If dotnet --info shows debian.-x64, it's not going to want to restore for what is not really a supported platform (rolling release of testing).
Thanks for the note. This doesn't help my situation: I am running this on Debian Stable, so I already have libcurl at that version:
# aptitude versions libcurl3
Package libcurl3:
i A 7.38.0-4+deb8u3 stable 500
As well, both of my dotnet binaries (from the microsoft/dotnet:lastest Docker image and the Debian 8 Docker image I built myself) report a debian.8.x64 RID, not debian.8.2-x64 nor debian.-x64.
# cat /etc/debian_version
8.4
The libcurl we're interested in is the one inside e.g. the Docker container, yes? I am hosting Docker in Debian unstable, which _does_ have the newer libcurl version. I only mention this because I noticed that the kernels (uname -a) in the Docker containers were the same as my host -- I think I might not fully understand how Docker works.
I just tried the obtain instructions from the website for Debian 8.2 from a Debian Jessie (8.4) installation in a virtual machine -- things seem to work just fine there. It works inside a Docker container inside the VM as well. The issue must be elsewhere, something even lower in the stack then, yes?
Is this still reproing for anyone recently? It seems that the discussion died down some time ago...
Yes, I had this issue on Ubuntu 16.04. Couldn't find out what's caused the problem. After a reboot, it works. Randomly not. Strange issue, cause it's a docker container, so it contains always the same versions of installed software...
@DMWOO7 what CLI version are you using? RC4?
Closing this issue as I don't think this is a problem anymore. Please, re-activate otherwise.
Most helpful comment
Problem was resolved by downgrading to
libcurl3=7.38.0(Jessie's version), per @tomciaaa's suggestion (after reading the last sentence carefully).