jborean93/omi

Cannot run Install-WSMan successfully

musicjunkieg opened this issue · 6 comments

SUMMARY
  1. I ran "Install-Module -Name PSWSMan" and didn't get an error.
  2. I ran sudo pwsh -Command 'Install-WSMan' and I got the error _Install-WSMan: Failed to select the necessary library, the host isn't macOS, Linux based on GLIBC or musl, or OpenSSL isn't installed

However, when I ran: which openssl I got
/opt/homebrew/opt/openssl@1.1/bin/openssl
and when I run openssl version I get
OpenSSL 1.1.1l 24 Aug 2021

LIBMI VERSION
OS / ENVIRONMENT

MacOS Monterey 12.0.1 on Apple Silicon M1 Chip

Name Value


PSVersion 7.2.0
PSEdition Core
GitCommitId 7.2.0
OS Darwin 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:24 PDT 2021; root:xnu-8019.41.5~1/RELEASE_ARM64_T8101
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0

Unfortunately the latest release of PSWSMan is not ready to support arm64 instances of pwsh. It also struggles a bit with selecting the proper OpenSSL version. While there are fixes in the main branch to get things working the changes aren't quite ready and is waiting on a fix for #28.

You might have some luck by using the nupkg from main which you can get from the latest CI run https://github.com/jborean93/omi/actions/runs/1443387815. The nupkg just needs to be extracted in the usual module location and things should work. Until a new release happens this is really the only option for the M1 macs.

@jborean93 I have the same issue on an Intel macbook pro running Big Sur 11.6.1

Install-WSMan: Failed to select the necessary library, the host isn't macOS, Linux based on GLIBC or musl, or OpenSSL isn't installed

I recently installed Powershell 7.2.0, could it be related to that?
It has worked in the past for me.

Could be. I can try on my Intel MacBook Pro and stay on 7.1.5 with WSMan

@musicjunkieg I downgraded to 7.1.4 and I am still getting the same error message.
so it is a different problem and not the powershell version.

I've just pushed the latest changes to the new release v2.3.0. This should solve many of the issues with macOS including support for arm64 versions of PowerShell. If you are still having problems please make sure you ran Install-WSMan -Verbose to see more verbose information about the install process which shows things like what OpenSSL versions that were tried and whether they were relevant or not.

@jborean93
thanks for that new versionx
v2.3.0 works for me with PwSh 7.2.0 on Intel macbook pro running Big Sur 11.6.1