search
top

Installing Microsoft PowerShell Core 6.x on Fedora 28

Installing Microsoft PowerShell Core 6.x on Fedora 28

In an earlier post we covered the release and install of PowerShell Core 6 on Linux and OS X. In this post we will install PowerShell Core 6.1 preview 2 on Fedora 28.

Download the rhel7 RPM for PowerShell Core 6.1 preview 2 from https://github.com/PowerShell/PowerShell/releases/tag/v6.1.0-preview.2.  Once downloaded the installation is a standard rpm install using dnf.

 sudo dnf -y install powershell-6.1.0-preview.2-1.rhel.7.x86_64.rpm

At this point PowerShell is installed and can be invoked using pwsh command, but there is an error that needs to be addressed and changes the way you invoke PowerShell.

After installing powershell-6.1.0-preview.2 and trying to start PowerShell received the following error.

$ 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)

The error is caused by xterm and currently your only workaround is invoke PowerShell as such.

TERM=xterm pwsh

Here’s what we get

$ TERM=xterm pwsh 
PowerShell v6.1.0-preview.2 
Copyright (c) Microsoft Corporation. All rights reserved. 

https://aka.ms/pscore6-docs 
Type 'help' to get help. 

PS /home/me/Downloads>

That pretty much all there is to installing PowerShell Core 6 on Fedora 28.

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

top