powershell on fedora 24 - plembo/onemoretech GitHub Wiki
#Installing PowerShell on Fedora 24
November 2, 2016
Needed this for some testing.
Basically followed this post from the Hacker News.
First, downloaded the latest official Microsoft rpm for 64-bit CentOS from Github. I know, that sounds weird, doesn't it?
Next, install these dependencies:
dnf install icu lldb lldb-devel lttng-tools lttng-ust
Download these necessary obsolete packages from Fedora 17 and 19:
penssl-1.0.0i-1.fc17.x86_64.rpm
libicu-50.1.2-5.fc19.x86_64.rpm
Install the Microsoft package with deps turned off:
rpm -ivh --nodeps powershell-6.0.0_alpha.11-1.el7.centos.x86_64.rpm
Create a directory to hold the obsolete libraries:
mkdir /opt/microsoft/powershell/lib
Extract the contents of the two obsolete rpms:
rpm2cpio openssl-1.0.0i-1.fc17.x86_64.rpm | cpio -idmv
rpm2cpio libicu-50.1.2-5.fc19.x86_64.rpm | cpio -idmv
Copy all files and folders from the resulting lib64 and usr/lib64 to /opt/microsoft/powershell/lib.
Create a shell script named powershell (no file extension) under /usr/local/bin.
Contents of shell script:
#!/bin/bash
LD_LIBRARY_PATH=/opt/microsoft/powershell/lib /usr/bin/powershell
Here's the prompt:
[me@mine ~]$ powershell
PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.
PS /home/me>
Copyright 2004-2019 Phil Lembo