Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap : Issue with Running .NET Core 3.1 applications on Ubuntu 20.10 or 20.04 #60435

Open
Tracked by #62241
rbhanda opened this issue Apr 13, 2021 · 2 comments
Open
Tracked by #62241

Comments

@rbhanda
Copy link
Contributor

rbhanda commented Apr 13, 2021

The error while running sudo snap install dotnet-sdk --channel 3.1/stable --classic on Ubuntu 20.04 or Ubuntu 20.10

parallels@parallels-Parallels-Virtual-Platform:~/Desktop/Parallels Shared Folders/Home/Desktop$ cd myApp
parallels@parallels-Parallels-Virtual-Platform:~/Desktop/Parallels Shared Folders/Home/Desktop/myApp$ sudo dotnet-sdk.dotnet run
Process terminated. Couldn't find a valid ICU package installed on the system. Set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support.
   at System.Environment.FailFast(System.String)
   at System.Globalization.GlobalizationMode.GetGlobalizationInvariantMode()
   at System.Globalization.GlobalizationMode..cctor()
   at System.Globalization.CultureData.CreateCultureWithInvariantData()
   at System.Globalization.CultureData.get_Invariant()
   at System.Globalization.CultureInfo..cctor()
   at System.String.ToLowerInvariant()
   at System.Text.EncodingHelper.GetCharset()
   at System.Text.EncodingHelper.GetEncodingFromCharset()
   at System.ConsolePal.GetConsoleEncoding()
   at System.Console+<>c.<get_OutputEncoding>b__19_0()
   at System.Threading.LazyInitializer.EnsureInitializedCore[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
   at System.Threading.LazyInitializer.EnsureInitialized[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
   at System.Console.get_OutputEncoding()
   at System.Console.CreateOutputWriter(System.IO.Stream)
   at System.Console+<>c.<get_Out>b__26_0()
   at System.Threading.LazyInitializer.EnsureInitializedCore[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
   at System.Threading.LazyInitializer.EnsureInitialized[[System.__Canon, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](System.__Canon ByRef, System.Object ByRef, System.Func`1<System.__Canon>)
   at System.Console.get_Out()
   at System.Console.WriteLine(System.String)
   at myApp.Program.Main(System.String[])
parallels@parallels-Parallels-Virtual-Platform:~/Desktop/Parallels Shared Folders/Home/Desktop/myApp$ dotnet-sdk.dotnet run

Welcome to .NET Core 3.1!
---------------------
SDK Version: 3.1.408

Telemetry
---------
The .NET Core tools collect usage data in order to help us improve your experience. It is collected by Microsoft and shared with the community. You can opt-out of telemetry by setting the DOTNET_CLI_TELEMETRY_OPTOUT environment variable to '1' or 'true' using your favorite shell.

Read more about .NET Core CLI Tools telemetry: https://aka.ms/dotnet-cli-telemetry

----------------
Explore documentation: https://aka.ms/dotnet-docs
Report issues and find source on GitHub: https://github.com/dotnet/core
Find out what's new: https://aka.ms/dotnet-whats-new
Learn about the installed HTTPS developer cert: https://aka.ms/aspnet-core-https
Use 'dotnet --help' to see available commands or visit: https://aka.ms/dotnet-cli-docs
Write your first app: https://aka.ms/first-net-core-app
--------------------------------------------------------------------------------------
/snap/dotnet-sdk/123/sdk/3.1.408/NuGet.targets(128,5): error : Unable to obtain lock file access on '/tmp/NuGetScratch/lock/d86576abc10def924f6f8b93df2969f6fe20f8c0' for operations on '/media/psf/Home/Desktop/myApp/obj/project.nuget.cache'. This may mean that a different user or administator is holding this lock and that this process does not have permission to access it. If no other process is currently performing an operation on this file it may mean that an earlier NuGet process crashed and left an inaccessible lock file, in this case removing the file '/tmp/NuGetScratch/lock/d86576abc10def924f6f8b93df2969f6fe20f8c0' will allow NuGet to continue. [/media/psf/Home/Desktop/myApp/myApp.csproj]

The build failed. Fix the build errors and run again.
parallels@parallels-Parallels-Virtual-Platform:~/Desktop/Parallels Shared Folders/Home/Desktop/myApp$ cd ..
parallels@parallels-Parallels-Virtual-Platform:/media/psf/Home/Desktop$ sudo dotnet-sdk.dotnet new console -o myApp
The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on myApp/myApp.csproj...
  Determining projects to restore...
  Restored /media/psf/Home/Desktop/myApp/myApp.csproj (in 184 ms).

Restore succeeded.

@rbhanda rbhanda changed the title Snap Running .NET Core 2.1/3.1, .NET 5.0 applications on Ubuntu 20.10 or 20.04 Snap : Issue with Running .NET Core 3.1 applications on Ubuntu 20.10 or 20.04 Apr 13, 2021
@Coda17
Copy link

Coda17 commented May 3, 2021

It appears that one of the temporary NuGet files is locked by another process. Have you tried restarting your computer and then trying again (without opening any other applications so it doesn't get locked again)?

@mairaw mairaw transferred this issue from dotnet/core Oct 14, 2021
@dotnet-issue-labeler
Copy link

I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.

@dotnet-issue-labeler dotnet-issue-labeler bot added the untriaged New issue has not been triaged by the area owner label Oct 14, 2021
@NikolaMilosavljevic NikolaMilosavljevic removed the untriaged New issue has not been triaged by the area owner label Dec 8, 2021
@NikolaMilosavljevic NikolaMilosavljevic added this to the Future milestone Aug 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants