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

Repl doesn't run on linux mint(ubuntu) #79

Open
SajadJalilian opened this issue Dec 6, 2022 · 3 comments
Open

Repl doesn't run on linux mint(ubuntu) #79

SajadJalilian opened this issue Dec 6, 2022 · 3 comments
Labels
bug Something isn't working external

Comments

@SajadJalilian
Copy link

SajadJalilian commented Dec 6, 2022

I installed id via "dotnet tool install -g dotnet-repl"
I get this error when I try to start to repel

System:
Kernel: 5.15.0-56-generic x86_64 bits: 64 compiler: gcc v: 11.3.0 Desktop: Cinnamon 5.4.12
tk: GTK 3.24.33 wm: Mutter dm: LightDM Distro: Linux Mint 21 Vanessa base: Ubuntu 22.04 jammy

Unhandled exception: System.IO.FileNotFoundException: Could not load file or assembly 'System.Management.Automation, Version=7.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.

File name: 'System.Management.Automation, Version=7.2.6.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Microsoft.DotNet.Interactive.PowerShell.PowerShellKernel..ctor()
   at dotnet_repl.KernelBuilder.CreateKernel(StartupOptions options) in C:\projects\dotnet-repl\src\dotnet-repl\KernelBuilder.cs:line 71
   at dotnet_repl.CommandLineParser.StartAsync(StartupOptions options, IAnsiConsole ansiConsole, InvocationContext context) in C:\projects\dotnet-repl\src\dotnet-repl\CommandLineParser.cs:line 194
   at dotnet_repl.CommandLineParser.<>c__DisplayClass10_0.<<Create>b__0>d.MoveNext() in C:\projects\dotnet-repl\src\dotnet-repl\CommandLineParser.cs:line 117
--- End of stack trace from previous location ---
   at System.CommandLine.Invocation.AnonymousCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass17_0.<<UseParseErrorReporting>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass12_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass22_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass19_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__18_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseParseDirective>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__5_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass8_0.<<UseExceptionHandler>b__0>d.MoveNext()
@SajadJalilian SajadJalilian changed the title Repel dosent run on linux mint(ubuntu) Repel doesn't run on linux mint(ubuntu) Dec 6, 2022
@jonsequitur jonsequitur added the bug Something isn't working label Dec 6, 2022
@jonsequitur
Copy link
Owner

This looks like it's probably the same issue as dotnet/interactive#1790. I'm curious if the workaround described in this comment would help you.

@jonsequitur jonsequitur changed the title Repel doesn't run on linux mint(ubuntu) Repl doesn't run on linux mint(ubuntu) Jan 7, 2023
@airbreather
Copy link

I'm curious if the workaround described in this comment would help you.

The workaround solved it for me on EndeavourOS, which is another Arch-based distro like Manjaro that can use the AUR as mentioned in the comment. Thanks for the link!

Unfortunately, the user who opened this issue cannot use that exact same workaround: Linux Mint and Ubuntu are not Arch-based, and the AUR only really works for Arch-based distros.

But the core concept is probably the same: the general idea of the workaround is to try using Microsoft's binaries. This page has the instructions for how to set that up on Ubuntu (and friends), just make sure you're following one of the sections that says you're going to be using "the Microsoft package feed".

@obratim
Copy link

obratim commented Aug 3, 2024

It is an issue in Microsoft.PowerShell.SDK package.

System.Management.Automation is stored in same git repository and is referenced as project, not as a package. As the result in the nuspec file written that it depends on a one version of System.Management.Automation, but inside nupkg archive under ref/net8.0/ there is another version of System.Management.Automation.dll.

This confusion causes error.

Reported a bug: PowerShell/PowerShell#24110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working external
Projects
None yet
Development

No branches or pull requests

4 participants