Repl doesn't run on linux mint(ubuntu)
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()
This looks like it's probably the same issue as https://github.com/dotnet/interactive/issues/1790. I'm curious if the workaround described in this comment would help you.
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".
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: https://github.com/PowerShell/PowerShell/issues/24110