This repository was archived by the owner on Jun 13, 2024. It is now read-only.
This repository was archived by the owner on Jun 13, 2024. It is now read-only.
Cannot install powershell modules on CentOS 7 #192
Open
Description
I have powershell-6.0.0_beta.9-1.rhel.7.x86_64 on CentOS 7.4.1708
PS /root> Install-Module -Name psCheckPoint -Scope CurrentUser -Force
... .. Installing package 'psCheckPoint' Downloaded 0.00MB out of 0.63MB Installing package 'psCheckPoint' Downloaded 0.31MB out of 0.63MB
[ooooooooo ] Installing package 'psCheckPoint' .. . Unzipping [ooooo ]
S /root> Import-Module psCheckPoint Import-Module
The specified module 'psCheckPoint' was not loaded because no valid module file was found in any module
Noting created in .local/share/powershell/Modules/
Activity
bmanikm commentedon Nov 7, 2017
@adaviel Can you get the debug output of following command from your environment?
adaviel commentedon Nov 7, 2017
See attached file
pwsh.debug.log
bmanikm commentedon Nov 8, 2017
@adaviel Thanks for providing the debug output, unfortunately this debug output is not helping us in determining the root cause of the issue.
Is this issue happening only for psCheckPoint module?
Are you able to install any other module on your machine?
Do you know whether the psCheckPoint module is supported on PWSH?
Please use Save-Module as a workaround until we understand the root cause of this issue on CentOS.
If possible, please provide the output for following commands.
adaviel commentedon Nov 8, 2017
I can not install any modules. I was told I needed to install MSOnline, which is why I was trying, but that turned out to be a different bug and I did not really need it.
I'm not that familiar with powershell; I do not know whether psCheckPoint is supported. A responder on a different tracker told me to try that, then said I should re-post the issue in this tracker.
See attached log. Save-Module creates the directory tree, but does not actually populate it.
I assume if I could download a module with wget I could install it, but it's not obvious to me how I could do that.
debug2.log
bmanikm commentedon Nov 9, 2017
It looks like NuGet provider is unable to download the file on your machine.
Again for further investigation, please provide the output of below commands.
If above commands work properly, please use the below command as a workaround.
adaviel commentedon Nov 9, 2017
debug3.log
It seems I do now have
/tmp/psCheckPoint.0.7.8/psCheckPoint.psd1
so that
Test-ModuleManifest -Path /tmp/psCheckPoint.0.7.8/psCheckPoint.psd1
and
Import-Module /tmp/psCheckPoint.0.7.8/psCheckPoint.psd1
work
debug4.log
bmanikm commentedon Nov 9, 2017
@adaviel Thanks for the logs.
From debug3.log and debug4.log, it is clear that it is a NuGet provider issue where -ExcludeVersion is not honored.
@brywang-msft Could you please take a look at this issue in NuGet provider?
Earlier reported issue --> PowerShell/PowerShell#3986
sanyer commentedon Jul 9, 2018
I'm experiencing the same issue on Amazon Linux 2 (which is RHEL7/CentOS 7 compatible).
Installing module as was suggested in this comment https://github.com/PowerShell/PowerShellGet/issues/192#issuecomment-343002826 helped.
But, module was installed in flat directory structure, so no child folder with version.
After I created folder with version and moved files there, become was able to import the module.