New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installing Module using Install-Module Fails #3986
Comments
Just tried this on Ubuntu 16.04 and it installed fine. cc @bmanikm |
I've experienced the same issue on Mint 18.1, trying to follow the documented steps for getting the Azure modules.
There's a flickering here indicating a download, almost like a status bar rendered in ASCII. Then it disappears.
|
cc @KrishnaV-MSFT |
Same fricking problem. |
I think you'll get more attention to this if you open an issue here https://github.com/powershell/powershellget |
@ishu3101 If possible, could you please get the debug output of Install-Module cmdlet from the repro machine? @yevster , @nlazouzi, @MaximoTrinidad : I think, the Azure/AzureRM modules, you are trying to import/use, may not be supported yet on PowerShell Core. |
@yevster @chuanjiao10 @nlazouzi @MaximoTrinidad You should use AzureRM.NetCore.Preview module on PowerShell Core. |
@chuanjiao10 CC: @markcowl |
|
@chuanjiao10 |
@nlazouzi Thanks for providing the debug output of Install-Module cmdlet. From this output, it looks like you are able to install the PSMarkdown module without any error. |
@bmanikm FYI i was able to install these guys with no problem >>
|
@bmanikm When I run the command
|
@ishu3101 Couple of options:
$currentDebugpreference = $debugpreference
$debugpreference = "Continue"
Install-Module PSMarkdown -Scope CurrentUser -Verbose
$debugpreference = $currentDebugpreference
$debugpreference |
When I Press A to Yes to All with the -Debug switch, I get the following output.
|
@ishu3101 I am unable to repro the reported issue (debug messages provided below). PSMarkdown module got installed properly to '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/1.1'. Could you please try below command and provide the output? Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/ubuntu/.local/share/powershell/Modules/' -Verbose -Debug -ExcludeVersion -Force
Test-ModuleManifest '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/PSMarkdown.psd1' -verbose Please let me know if there are any special instructions to repro this issue. ` Confirm Confirm PS /home/ubuntu> $PSVersionTable Name Value PSVersion 6.0.0-beta |
PS /home/ubuntu/> Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/ubuntu/.local/share/powershell/Modules/' -Verbose -Debug -ExcludeVersion -Force
PS /home/ubuntu/> Test-ModuleManifest '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/PSMarkdown.psd1' -verbose
|
Thanks @ishu3101, It looks like there might be a case-sensitivity issue going on here. Please get the output of following commands to investigate further. Get-ChildItem '/home/ubuntu/.local/share/powershell/Modules/' -Recurse
Get-Module -ListAvailable PSMarkdown
Get-PackageProvider
Get-PackageProvider -ListAvailable
Get-Module PowerShellGet,PackageManagement
Get-Module PowerShellGet,PackageManagement -ListAvailable
$PSVersionTable |
PS /home/ubuntu/> Get-ChildItem '/home/ubuntu/.local/share/powershell/Modules/' -Recurse
PS /home/ubuntu/> Get-PackageProvider -ListAvailable
PS /home/ubuntu/> Get-Module PowerShellGet,PackageManagement
PS /home/ubuntu/> Get-Module PowerShellGet,PackageManagement -ListAvailable
PS /home/ubuntu/> $PSVersionTable
|
@ishu3101 It looks like '/home/ubuntu/.local/share/powershell/Modules/' directory is not created for some reasons on your machine. To confirm, run below command. Get-ChildItem '/home/ubuntu/.local/share/powershell/Modules/' Please try again after creating the '/home/ubuntu/.local/share/powershell/Modules/' folder. md '/home/ubuntu/.local/share/powershell/Modules/' -verbose
Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/ubuntu/.local/share/powershell/Modules/' -Verbose -Debug -ExcludeVersion -Force
Test-ModuleManifest '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/PSMarkdown.psd1' -verbose
Now, try to install some other module using Install-Module cmdlet to the CurrentUser scope. |
When I run the command below
it install the PSMarkdown module but the name of the folder is PSMarkdown.1.1, so running
gives the following output
When I try to install another Module such as FormatMarkdown & PSHTMLTable using |
Thanks @ishu3101, from the above results, it looks like NuGet provider is not installing the package properly with version excluded folder name. @brywang-msft @jianyunt Please take a look at the above issue in NuGet provider. NuGet provider is not excluding the package version in package folder name when -ExcludeVersion is specified. More details on this issue can be found in above comments. Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/ubuntu/.local/share/powershell/Modules/' -Verbose -Debug -ExcludeVersion -Force |
@ishu3101, did install-package or module worked on you machine with earlier version of PSCore such as 6.0.0-alpha before?
|
No, it did not work with earlier version of PSCore as mentioned here #2165. When, I run
it says
After running the above command with sudo, and then running
PS > dir /home/jianyunt/packages
I have installed PSCore and been having this issue while using Powershell on a Cloud IDE |
Hi @ishu3101, are you only seeing this issue in c9.io images? I tried a repro in both Ubuntu 14.04 and 16.04 LTS with PSCore beta2 and wasn't able to get one. Can you confirm your distro/version? Try |
Running the command
|
The issue is still present, although no surprise there looking at the number of issues. Does anyone knows how to install it manually i.e. download the module to the directory? |
@MichalTaratuta Can you please specify if you're seeing this on a cloud IDE, container, VM (local or cloud), or local? You can try Save-Module, but Import-Module is still literally just downloading files to a specific directory. If Save-Module doesn't work, you can always download the module somewhere that works (via Save-Module or Import-Module) then transfer it. |
FYI Recently, I've been working with the Install-Module to install the "SQL Server Management Objects (SMO) Framework" in both Windows and Linux systems.
I had no issues. OS: |
This issue got resolved in PowerShellGet with https://github.com/PowerShell/PowerShellGet/pull/313. |
When I try to install a module using
Install-Module PSMarkdown -Scope CurrentUser
, it shows a very quick message sayingInstalling package PSMarkdown
and then the message goes away and nothing gets installed.When I run
$PSVersionTable
, this is what I get. I'm running Powershell on Linux running Ubuntu 14.04.2 LTSHowever when I install Powershell using docker on https://www.katacoda.com/courses/docker/playground via
docker run -it --rm microsoft/powershell
and then try to install any Powershell Module it installs as expected.This is what I get when I run $PSVersionTable on the above docker image running Powershell.
The text was updated successfully, but these errors were encountered: