PowerShell Failing to Run on Fedora 28



  • If you have Fedora Linux, and specifically this was seen on Fedora 28, you might run into an issue with PowerShell being unable to run due to a terminfo database invalid error. The current version of PS for Linux is PowerShell v6.1.0-preview.2 and the bug has been reported and is known to Microsoft and likely will be fixed very soon as it is pretty simple under the hood (we believe.) In the meantime, this is the error you are likely to see:

    $ pwsh
    PowerShell v6.1.0-preview.2
    Copyright (c) Microsoft Corporation. All rights reserved.
    
    https://aka.ms/pscore6-docs
    Type 'help' to get help.
    
    FailFast: The terminfo database is invalid.
    
       at System.Environment.FailFast(System.String, System.Exception)
       at System.Environment.FailFast(System.String, System.Exception)
       at Microsoft.PowerShell.UnmanagedPSEntry.Start(System.String, System.String[], Int32)
       at Microsoft.PowerShell.ManagedPSEntry.Main(System.String[])
    Aborted (core dumped)
    

    There are a number of fixes. But a very simple one is to install xterm and use xterm, instead of the default Tilix, as your terminal emulator.

    sudo dnf -y install xterm
    

    Then simple run xterm and start PowerShell as usual with pwsh and the error should be gone.



  • For those wondering, there is an upstream fix already in place, it just hasn't trickled down yet.



  • The "run from xterm" fix even works if you are SSHing into a remote system. It is your local terminal emulator that has to be addressed, not something installed on the system where PowerShell is necessarily running.



  • Is that only a Fedora issue?



  • @scottalanmiller I just upgraded my Linux pc yesterday and haven't used PowerShell on it yet. It was working great on 27. I'm curious now.



  • @obsolesce said in PowerShell Failing to Run on Fedora 28:

    @scottalanmiller I just upgraded my Linux pc yesterday and haven't used PowerShell on it yet. It was working great on 27. I'm curious now.

    It didn’t work with new install or upgrade.



  • @black3dynamite said in PowerShell Failing to Run on Fedora 28:

    Is that only a Fedora issue?

    No, definitely not isolated to Fedora. It's any distro, or any that are set up, in a way that PS doesn't like in terms of the xterm environmental. So most, I would assume, are affected, but all have a fix. It's a PS bug, and decently easy to work around.