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

Closed
ishu3101 opened this Issue Jun 10, 2017 · 34 comments

Comments

Projects
None yet
@ishu3101

ishu3101 commented Jun 10, 2017

When I try to install a module using Install-Module PSMarkdown -Scope CurrentUser, it shows a very quick message saying Installing 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 LTS

Name                           Value                                                                                                                                               
----                           -----                                                                                                                                               
PSVersion                      6.0.0-beta                                                                                                                                          
PSEdition                      Core                                                                                                                                                
BuildVersion                   3.0.0.0                                                                                                                                             
CLRVersion                                                                                                                                                                         
GitCommitId                    v6.0.0-beta.2                                                                                                                                       
OS                             Linux 4.9.17-c9 #1 SMP Thu Mar 23 01:38:54 UTC 2017                                                                                                 
Platform                       Unix                                                                                                                                                
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                             
PSRemotingProtocolVersion      2.3                                                                                                                                                 
SerializationVersion           1.1.0.1                                                                                                                                             
WSManStackVersion              3.0    

However 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.

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
BuildVersion                   3.0.0.0
CLRVersion
GitCommitId                    v6.0.0-beta.2
OS                             Linux 4.4.49-1-lts #1 SMP Wed Feb 15 18:04:00 CET 2017
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Jun 10, 2017

Just tried this on Ubuntu 16.04 and it installed fine. cc @bmanikm

@yevster

This comment has been minimized.

yevster commented Jun 13, 2017

I've experienced the same issue on Mint 18.1, trying to follow the documented steps for getting the Azure modules.

PS /home/yevster> $PSVersionTable.PSVersion                                                                         

Major Minor Patch Label
----- ----- ----- -----
    6     0     0 beta 

PS /home/yevster> Install-Module Azure -Force   

There's a flickering here indicating a download, almost like a status bar rendered in ASCII. Then it disappears.

PS /home/yevster> Import-Module Azure                                                                               
Import-Module : The specified module 'Azure' was not loaded because no valid module file was found in any module 
directory.
At line:1 char:1
+ Import-Module Azure
+ ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (Azure:String) [Import-Module], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.ImportModuleCommand
 
PS /home/yevster> gcm -Module Azure                                                                                 
PS /home/yevster> 

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Jun 13, 2017

cc @KrishnaV-MSFT

@MaximoTrinidad

This comment has been minimized.

MaximoTrinidad commented Jun 16, 2017

OK!! On my Ubuntu 16.04.2
In order to install AzureRM, it need to run under admin privileges. So, I did the installation with the following steps:

  1. Open Terminal,
  2. Type powershell
  3. Run the cmdlet: Install-module AzureRM -> it failed as it need to run under Admin privileges.
  4. Run the command: sudo -i
  5. Then, execute powershell
  6. Run the cmdlet: Install-Module AzureRM -> this time it completes executing w/no errors.
  7. Type 'Exit' twice to get back to the original powershell session.
  8. Then, list all modules:
    Get-Module -ListAvailable | Select name, version -> but no AzureRM listed.

I open the Nautilus File Browser with sudo and search for the AzureRm module.
This time I found it under a 'tmp/99999' folder.

So, I'm think the Azure modules may not be installing correctly.
:)
azurerm_notfound

@chuanjiao10

This comment has been minimized.

chuanjiao10 commented Jun 16, 2017

help to test on centos 7.3:
Install-Module AzureRM -> this time it completes executing w/no errors
import-module AzureRM
no module in '/opt/microsoft/powershell/6.0.0-beta.2/Modules'
and /tmp/random number folder deleted.

Casually guess:
When expand xxx.nuget, file name character case related?

@nlazouzi

This comment has been minimized.

nlazouzi commented Jun 16, 2017

Same fricking problem.

@SteveL-MSFT

This comment has been minimized.

Member

SteveL-MSFT commented Jun 16, 2017

I think you'll get more attention to this if you open an issue here https://github.com/powershell/powershellget

@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 16, 2017

@ishu3101 If possible, could you please get the debug output of Install-Module cmdlet from the repro machine? Install-Module PSMarkdown -Scope CurrentUser -Verbose -Debug

@yevster , @nlazouzi, @MaximoTrinidad : I think, the Azure/AzureRM modules, you are trying to import/use, may not be supported yet on PowerShell Core.

@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 16, 2017

@yevster @chuanjiao10 @nlazouzi @MaximoTrinidad You should use AzureRM.NetCore.Preview module on PowerShell Core.

@chuanjiao10

This comment has been minimized.

chuanjiao10 commented Jun 16, 2017

@bmanikm
at powershell 10th year,i remeber a video demonstration how to use AzureRM modules on linux.
In any case, AzureRM modules is a high priority issue

@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 16, 2017

@chuanjiao10
Please refer to Azure/azure-powershell#3994 (comment).
FYI, Azure demo on Linux also used AzureRM.NetCore.Preview module.

CC: @markcowl

@nlazouzi

This comment has been minimized.

nlazouzi commented Jun 16, 2017

@bmanikm

DEBUG: 00:00:00.0000247 Trying provider assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.NuGetProvider.dll
DEBUG: 00:00:00.0000370 Trying provider assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.CoreProviders.dll
DEBUG: 00:00:00.0137003 Attempting loading of assembly:
/opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.MetaProvider.PowerShell.dll
DEBUG: 00:00:00.0139725 Attempting loading of assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.NuGetProvider.dll
DEBUG: 00:00:00.0140673 Attempting loading of assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.CoreProviders.dll
DEBUG: 00:00:00.0141658 Attempting loading of assembly:
/opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.ArchiverProviders.dll
VERBOSE: Acquiring providers for assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.CoreProviders.dll
VERBOSE: Acquiring providers for assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.NuGetProvider.dll
VERBOSE: Acquiring providers for assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.ArchiverProviders.dll
VERBOSE: Acquiring providers for assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.MetaProvider.PowerShell.dll
DEBUG: 00:00:00.0897986 Registering providers via metaproviders for assembly Microsoft.PackageManagement.MetaProvider.PowerShell.Internal.PowerShellMetaProvider
DEBUG: 00:00:00.1875152 Initializing provider 'zipfile'
DEBUG: 00:00:00.1875152 Initializing provider 'Bootstrap'
DEBUG: 00:00:00.1883296 Initializing provider 'WebDownloader'
DEBUG: 00:00:00.1890152 Initializing provider 'NuGet'
DEBUG: 00:00:00.1892998 Trying to register metaprovider
DEBUG: 00:00:00.2263896 Initializing PowerShell MetaProvider
DEBUG: 00:00:00.2280189 Provider 'WebDownloader' Initialized
DEBUG: 00:00:00.2280433 Provider 'zipfile' Initialized
DEBUG: 00:00:00.2281028 Using Downloader Provider WebDownloader
DEBUG: 00:00:00.2281042 Using Archiver Provider zipfile
DEBUG: 00:00:00.2432317 Initialize Bootstrapper
DEBUG: 00:00:00.2436835 Provider 'Bootstrap' Initialized
DEBUG: 00:00:00.2437687 Using Package Provider Bootstrap
DEBUG: 00:00:00.2499016 Calling 'NuGet'::'InitializeProvider'.
DEBUG: 00:00:00.2500607 Provider 'NuGet' Initialized
DEBUG: 00:00:00.2501157 Using Package Provider NuGet
DEBUG: 00:00:00.2837409 Attempting to load PowerShell Provider Module [/opt/microsoft/powershell/6.0.0-beta.2/Modules/PowerShellGet/1.1.3.1/PSModule.psm1]
DEBUG: 00:00:00.2983666 Calling 'zipfile::GetFeatures'
DEBUG: 00:00:00.3002101 Calling 'WebDownloader::GetFeatures'
DEBUG: 00:00:00.3111532 Calling 'NuGet'::'GetFeatures'.
DEBUG: 00:00:00.3138632 Calling 'Bootstrap::GetFeatures'
DEBUG: 00:00:00.3144515 SUCCESS provider assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.ArchiverProviders.dll
DEBUG: 00:00:00.3165742 The provider 'NuGet' is imported
DEBUG: 00:00:00.3168259 The provider 'Bootstrap' is imported
DEBUG: 00:00:00.3188473 SUCCESS provider assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.NuGetProvider.dll
DEBUG: 00:00:00.3192528 SUCCESS provider assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.CoreProviders.dll
DEBUG: 00:00:00.3671691 Loaded PowerShell package provider: '[/opt/microsoft/powershell/6.0.0-beta.2/Modules/PowerShellGet/1.1.3.1/PSModule.psm1]'.
DEBUG: 00:00:00.3784452 Loaded PowerShell Provider: PowerShellGet
DEBUG: 00:00:00.3818706 Initializing provider 'PowerShellGet'
DEBUG: 00:00:00.3959393 Calling New() : MethodName = 'InitializeProvider'
DEBUG: 00:00:00.3960170 Debug: True
DEBUG: 00:00:00.3960324 Name: PSMarkdown
DEBUG: 00:00:00.3960410 Verbose: True
DEBUG: 00:00:00.4025347 INVOKING PowerShell Fn Initialize-Provider with args that has length 0
DEBUG: 00:00:00.4160198 In PowerShellGet Provider - 'Initialize-Provider'.
DEBUG: 00:00:00.4164771 PowerShell Script 'PSModule' Function 'Initialize-Provider' returns null.
DEBUG: 00:00:00.4181851 Done calling powershell «Initialize-Provider» «PSModule»
DEBUG: 00:00:00.4182659 Provider 'PowerShellGet' Initialized
DEBUG: 00:00:00.4183011 Using Package Provider PowerShellGet
DEBUG: 00:00:00.4253132 Calling New() : MethodName = 'GetFeatures'
DEBUG: 00:00:00.4253674 Debug: True
DEBUG: 00:00:00.4253873 Name: PSMarkdown
DEBUG: 00:00:00.4254032 Verbose: True
DEBUG: 00:00:00.4264975 INVOKING PowerShell Fn Get-Feature with args that has length 0
DEBUG: 00:00:00.4305787 In PowerShellGet Provider - 'Get-Feature'.
DEBUG: 00:00:00.4426410 Done calling powershell «Get-Feature» «PSModule»
DEBUG: 00:00:00.4428527 The provider 'PowerShellGet' is imported
DEBUG: 00:00:00.4455538 SUCCESS provider assembly:
/opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.MetaProvider.PowerShell.dll
DEBUG: 00:00:01.1181453 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:01.1182199 Debug: True
DEBUG: 00:00:01.1182376 Name: PSMarkdown
DEBUG: 00:00:01.1182521 Verbose: True
DEBUG: 00:00:01.1193730 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1
DEBUG: 00:00:01.1296992 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:01.1444288 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:01.1497904 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:01.1498292 Debug: True
DEBUG: 00:00:01.1498432 Name: PSMarkdown
DEBUG: 00:00:01.1498569 Verbose: True
DEBUG: 00:00:01.1505218 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1
DEBUG: 00:00:01.1513209 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:01.1550168 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:01.1620229 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:01.1620623 Debug: True
DEBUG: 00:00:01.1621229 Name: PSMarkdown
DEBUG: 00:00:01.1621375 Verbose: True
DEBUG: 00:00:01.1628263 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1
DEBUG: 00:00:01.1636524 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:01.1743644 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:01.1784300 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:01.1784673 Debug: True
DEBUG: 00:00:01.1784823 Name: PSMarkdown
DEBUG: 00:00:01.1784948 Verbose: True
DEBUG: 00:00:01.1791183 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1
DEBUG: 00:00:01.1799035 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:01.1850307 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:03.7471475 Calling SearchForPackages. Name='PSMarkdown'
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
DEBUG: 00:00:03.7877629 PackageProvider::FindPackage with name PSMarkdown
DEBUG: 00:00:03.7884940 Calling SearchForPackages After Select 1
DEBUG: 00:00:03.8563648 Calling New() : MethodName = 'FindPackage'
DEBUG: 00:00:03.8650837 Scope: CurrentUser
DEBUG: 00:00:03.8656752 ProviderName: PowerShellGet
DEBUG: 00:00:03.8662861 Type: Module
DEBUG: 00:00:03.8668646 Debug: True
DEBUG: 00:00:03.8679427 Name: PSMarkdown
DEBUG: 00:00:03.8686535 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:03.8691418 Verbose: True
DEBUG: 00:00:03.8705946 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4
DEBUG: 00:00:03.9800372 In PowerShellGet Provider - 'Find-Package'.
DEBUG: 00:00:04.0588122 OPTION: Scope => CurrentUser
DEBUG: 00:00:04.0596707 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:04.0603975 OPTION: Type => Module
DEBUG: 00:00:04.0611744 OPTION: Debug => True
DEBUG: 00:00:04.0619078 OPTION: Name => PSMarkdown
DEBUG: 00:00:04.0653709 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.0732246 OPTION: Verbose => True
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
DEBUG: 00:00:04.2068925 PackageProvider::FindPackage with name PSMarkdown
DEBUG: 00:00:04.2310449 Calling 'NuGet'::'FindPackage' - name='PSMarkdown', requiredVersion='',minimumVersion='', maximumVersion='''.
DEBUG: 00:00:04.2455266 Iterating 'PSMarkdown'.
DEBUG: 00:00:04.3052515 Calling 'NuGetRequest'::'RegisteredPackageSources', '/root/.config/NuGet/nuget.config'.
DEBUG: 00:00:04.3108195 Loading a configuration from file '/root/.config/NuGet/nuget.config'.
DEBUG: 00:00:04.3272241 Loaded a configuration from file '/root/.config/NuGet/nuget.config'.
DEBUG: 00:00:04.3344553 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:04.3373965 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:05.0279026 Source 'https://www.powershellgallery.com/api/v2/' is validated.
DEBUG: 00:00:05.0377867 Calling 'NuGetRequest'::'GetPackageById', 'PSMarkdown'.
DEBUG: 00:00:05.1474644 Calling 'HttpClientPackageRepository'::'FindPackagesById', 'PSMarkdown'.
DEBUG: 00:00:05.1494701 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'' for ''.
DEBUG: 00:00:05.1777945 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:05.4300485 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:05.5039725 '2' packages received in the last request.
VERBOSE: Total package yield:'1' for the specified package 'PSMarkdown'.
DEBUG: 00:00:05.6107316 Completed iterating for 'PSMarkdown'.
DEBUG: 00:00:05.8031827 Done calling powershell «Find-Package» «PSModule»
DEBUG: 00:00:05.8731688 Calling New() : MethodName = 'GetInstalledPackages'
DEBUG: 00:00:05.8738455 Scope: CurrentUser
DEBUG: 00:00:05.8742773 ProviderName: PowerShellGet
DEBUG: 00:00:05.8746914 Type: Module
DEBUG: 00:00:05.8760898 Debug: True
DEBUG: 00:00:05.8767435 Name: PSMarkdown
DEBUG: 00:00:05.8773170 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:05.8778859 Verbose: True
DEBUG: 00:00:05.8793682 INVOKING PowerShell Fn Get-InstalledPackage with args PSMarkdown, 1.1, , that has length 4
DEBUG: 00:00:05.8950990 In PowerShellGet Provider - 'Get-InstalledPackage'.
DEBUG: 00:00:05.8961230 OPTION: Scope => CurrentUser
DEBUG: 00:00:05.8987687 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:05.8997702 OPTION: Type => Module
DEBUG: 00:00:05.9005160 OPTION: Debug => True
DEBUG: 00:00:05.9013403 OPTION: Name => PSMarkdown
DEBUG: 00:00:05.9025190 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:05.9037020 OPTION: Verbose => True
DEBUG: 00:00:05.9356125 PowerShell Script 'PSModule' Function 'Get-InstalledPackage' returns null.
DEBUG: 00:00:05.9376264 Done calling powershell «Get-InstalledPackage» «PSModule»

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-Module" on target "Version '1.1' of module 'PSMarkdown'".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): a

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you
want to install the modules from 'PSGallery'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): a
DEBUG: 00:00:19.8501809 Calling New() : MethodName = 'InstallPackage'
DEBUG: 00:00:19.8532921 Scope: CurrentUser
DEBUG: 00:00:19.8540490 ProviderName: PowerShellGet
DEBUG: 00:00:19.8547098 Type: Module
DEBUG: 00:00:19.8554628 Debug: True
DEBUG: 00:00:19.8561810 Name: PSMarkdown
DEBUG: 00:00:19.8569651 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:19.8580272 Verbose: True
DEBUG: 00:00:19.8606890 INVOKING PowerShell Fn Install-Package with args NuGet|PSMarkdown|1.1|https://www.powershellgallery.com/api/v2/|Module that has length 1
DEBUG: 00:00:19.8740043 In PowerShellGet Provider - 'Install-Package'.
DEBUG: 00:00:19.9478987 In PowerShellGet Provider - 'Install-PackageUtility'.
DEBUG: 00:00:19.9517875 The FastPackageReference is 'NuGet|PSMarkdown|1.1|https://www.powershellgallery.com/api/v2/|Module'.
DEBUG: 00:00:19.9649071 OPTION: Scope => CurrentUser
DEBUG: 00:00:19.9661662 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:19.9668590 OPTION: Type => Module
DEBUG: 00:00:19.9675488 OPTION: Debug => True
DEBUG: 00:00:19.9682120 OPTION: Name => PSMarkdown
DEBUG: 00:00:19.9687988 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:19.9693690 OPTION: Verbose => True
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in '/root/.local/share/powershell/Modules'.
DEBUG: 00:00:19.9922109 ArtifactType is Module
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'PSMarkdown' with version '1.1' from the repository 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:20.0892140 Calling 'NuGet'::'InstallPackage',
'$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:20.0907449 Calling 'NuGetRequest'::'GetPackageByFastpath',
'$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:20.0977517 Calling 'NuGetRequest'::'ResolvePackageSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:20.1002030 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:20.1015708 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:20.4610163 Calling 'HttpClientPackageRepository'::'FindPackage', 'PSMarkdown'.
DEBUG: 00:00:20.4618384 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'' for ''.
DEBUG: 00:00:20.4683486 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:20.6930816 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:20.6945199 '2' packages received in the last request.
DEBUG: 00:00:20.6965485 'Package version' is '1.1'.
DEBUG: 00:00:20.6993010 'Request's Destination' is '/tmp/1901948749'.
DEBUG: 00:00:20.7287687 Calling 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:20.7546528 Returning the call 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:20.8480014 Calling 'NuGetClient'::'InstallPackage'. VERBOSE: InstallPackage' - name='PSMarkdown', version='1.1',destination='/tmp/1901948749' VERBOSE: DownloadPackage' - name='PSMarkdown', version='1.1',destination='/tmp/1901948749/PSMarkdown/PSMarkdown.nupkg', uri='https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'. VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'. VERBOSE: Completed downloading 'PSMarkdown'. DEBUG: 00:00:22.4159795 Calling 'NuGetClient'::'InstallPackageLocal'. VERBOSE: InstallPackageLocal' - name='PSMarkdown', version='1.1',destination='/tmp/1901948749' DEBUG: 00:00:22.8840177 /tmp/1901948749/PSMarkdown/PSMarkdown.nupkg DEBUG: 00:00:23.1907668 Returning the call 'NuGetClient'::'InstallPackageLocal'. DEBUG: 00:00:23.3865391 Returning the call 'NuGetClient'::'InstallSinglePackage'. VERBOSE: Module 'PSMarkdown' was installed successfully to path '/root/.local/share/powershell/Modules/PSMarkdown/1.1'. DEBUG: 00:00:23.7138788 Done calling powershell «Install-Package» «PSModule»

@chuanjiao10

This comment has been minimized.

chuanjiao10 commented Jun 16, 2017

ao,i not used Azure,module name remeber is wrong, but AzureRM.NetCore.Preview does not work.

Install-Module AzureRM.NetCore.Preview -> this time it completes executing w/no errors
Import-Module AzureRM.NetCore.Preview
Import-Module : Exception has been thrown by the target of an invocation.
At line:1 char:1

  • Import-Module AzureRM.NetCore.Preview
  •   + CategoryInfo          : NotSpecified: (:) [Import-Module], TargetInvocationException
      + FullyQualifiedErrorId : System.Reflection.TargetInvocationException,Microsoft.PowerShell.Commands.ImportModuleCommand
    
@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 16, 2017

@chuanjiao10
I think you'll get more attention to this AzureRM.NetCore.Preview error if you open an issue here
Cc: @markcowl

@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 16, 2017

@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.

@nlazouzi

This comment has been minimized.

nlazouzi commented Jun 16, 2017

@bmanikm FYI i was able to install these guys with no problem >>

Manifest   0.3.4      AzureRM.NetCore.Preview                                                                                                                                            
Manifest   0.3.4      AzureRM.Profile.NetCore.Preview     {Login-AzureRmAccount, Select-AzureRmSubscription}                                                                             
Manifest   0.3.4      AzureRM.Resources.NetCore.Preview               
@ishu3101

This comment has been minimized.

ishu3101 commented Jun 19, 2017

@bmanikm When I run the command Install-Module PSMarkdown -Scope CurrentUser -Verbose -Debug, I get different debug message each time I press Y to indicate Yes to the confirm message as shown below. I have shown the output only for the first four times to the Continue with this operation prompt below.

DEBUG: 00:00:00.0039249 Trying provider assembly: 
/opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.MetaProvider.PowerShell.dll

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: 00:00:00.0000002 Trying provider assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.NuGetProvider.dll

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: 00:00:00.0113778 Trying provider assembly: /opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.CoreProviders.dll

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: 00:00:00.0154327 Trying provider assembly: 
/opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.ArchiverProviders.dll

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): Y
DEBUG: 00:00:00.0360259 Attempting loading of assembly: 
/opt/microsoft/powershell/6.0.0-beta.2/Modules/PackageManagement/1.1.4.0/coreclr/Microsoft.PackageManagement.CoreProviders.dll
@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 19, 2017

@ishu3101 Couple of options:

  1. Press A [A] Yes to All for above command with -Debug switch, or
  2. Run following commands which should not prompt for debug messages
$currentDebugpreference = $debugpreference
$debugpreference = "Continue"
Install-Module PSMarkdown -Scope CurrentUser -Verbose 
$debugpreference = $currentDebugpreference
$debugpreference
@ishu3101

This comment has been minimized.

ishu3101 commented Jun 19, 2017

When I Press A to Yes to All with the -Debug switch, I get the following output.

DEBUG: 00:00:00 Calling New() : MethodName = 'GetDynamicOptions'

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 00:00:00.0000525 Verbose: True
DEBUG: 00:00:00.0001087 Debug: True
DEBUG: 00:00:00.0001593 Name: PSMarkdown
DEBUG: 00:00:00.0011871 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1
DEBUG: 00:00:00.0019930 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0035603 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0080623 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0081125 Verbose: True
DEBUG: 00:00:00.0081470 Debug: True
DEBUG: 00:00:00.0081773 Name: PSMarkdown
DEBUG: 00:00:00.0091783 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1
DEBUG: 00:00:00.0099681 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0129045 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0173916 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0174634 Verbose: True
DEBUG: 00:00:00.0174983 Debug: True
DEBUG: 00:00:00.0175297 Name: PSMarkdown
DEBUG: 00:00:00.0182687 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1
DEBUG: 00:00:00.0189431 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0236911 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0308044 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0308501 Verbose: True
DEBUG: 00:00:00.0308822 Debug: True
DEBUG: 00:00:00.0309099 Name: PSMarkdown
DEBUG: 00:00:00.0316372 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1
DEBUG: 00:00:00.0322914 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0365830 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:02.8464079 Calling SearchForPackages. Name='PSMarkdown'
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
DEBUG: 00:00:02.8479371 PackageProvider::FindPackage with name PSMarkdown
DEBUG: 00:00:02.8482993 Calling SearchForPackages After Select 1
DEBUG: 00:00:02.8519014 Calling New() : MethodName = 'FindPackage'
DEBUG: 00:00:02.8524230 Verbose: True
DEBUG: 00:00:02.8529984 Type: Module
DEBUG: 00:00:02.8534728 Scope: CurrentUser
DEBUG: 00:00:02.8540292 Debug: True
DEBUG: 00:00:02.8545031 Name: PSMarkdown
DEBUG: 00:00:02.8549937 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:02.8554456 ProviderName: PowerShellGet
DEBUG: 00:00:02.8568228 INVOKING PowerShell Fn Find-Package with args System.String[], , ,  that has length 4
DEBUG: 00:00:02.8581121 In PowerShellGet Provider - 'Find-Package'.
DEBUG: 00:00:02.8589536 OPTION: Verbose => True
DEBUG: 00:00:02.8594757 OPTION: Type => Module
DEBUG: 00:00:02.8600419 OPTION: Scope => CurrentUser
DEBUG: 00:00:02.8606313 OPTION: Debug => True
DEBUG: 00:00:02.8612609 OPTION: Name => PSMarkdown
DEBUG: 00:00:02.8618877 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:02.8625029 OPTION: ProviderName => PowerShellGet
VERBOSE: The -Repository parameter was not specified.  PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is 'NuGet'.
DEBUG: 00:00:02.8699844 PackageProvider::FindPackage with name PSMarkdown
DEBUG: 00:00:02.8771695 Calling 'NuGet'::'FindPackage' - name='PSMarkdown', requiredVersion='',minimumVersion='', maximumVersion='''.
DEBUG: 00:00:02.8781474 Iterating 'PSMarkdown'.
DEBUG: 00:00:02.8794815 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:02.8801029 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:04.0648609 Source 'https://www.powershellgallery.com/api/v2/' is validated.
DEBUG: 00:00:04.0659719 Calling 'NuGetRequest'::'GetPackageById', 'PSMarkdown'.
DEBUG: 00:00:04.4781303 Calling 'HttpClientPackageRepository'::'FindPackagesById', 'PSMarkdown'.
DEBUG: 00:00:04.4789360 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'' for ''.
DEBUG: 00:00:04.4803638 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:05.2934652 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:05.2949139 '2' packages received in the last request.
VERBOSE: Total package yield:'1' for the specified package 'PSMarkdown'.
DEBUG: 00:00:05.2971730 Completed iterating for 'PSMarkdown'.
DEBUG: 00:00:05.3077253 Done calling powershell «Find-Package» «PSModule»
DEBUG: 00:00:05.3148655 Calling New() : MethodName = 'GetInstalledPackages'
DEBUG: 00:00:05.3153518 Verbose: True
DEBUG: 00:00:05.3158547 Type: Module
DEBUG: 00:00:05.3163979 Scope: CurrentUser
DEBUG: 00:00:05.3169407 Debug: True
DEBUG: 00:00:05.3173483 Name: PSMarkdown
DEBUG: 00:00:05.3178650 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:05.3184008 ProviderName: PowerShellGet
DEBUG: 00:00:05.3196197 INVOKING PowerShell Fn Get-InstalledPackage with args PSMarkdown, 1.1, ,  that has length 4
DEBUG: 00:00:05.3209078 In PowerShellGet Provider - 'Get-InstalledPackage'.
DEBUG: 00:00:05.3217913 OPTION: Verbose => True
DEBUG: 00:00:05.3224762 OPTION: Type => Module
DEBUG: 00:00:05.3231587 OPTION: Scope => CurrentUser
DEBUG: 00:00:05.3238149 OPTION: Debug => True
DEBUG: 00:00:05.3244825 OPTION: Name => PSMarkdown
DEBUG: 00:00:05.3250595 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:05.3256711 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:05.3374143 PowerShell Script 'PSModule' Function 'Get-InstalledPackage' returns null.
DEBUG: 00:00:05.3386147 Done calling powershell «Get-InstalledPackage» «PSModule»

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-Module" on target "Version '1.1' of module 'PSMarkdown'".
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A

Untrusted repository
You are installing the modules from an untrusted repository. If you trust this repository, change its InstallationPolicy value by running the Set-PSRepository cmdlet. Are you sure you want to install the modules from 'PSGallery'?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A

DEBUG: 00:00:11.2047713 Calling New() : MethodName = 'InstallPackage'
DEBUG: 00:00:11.2054075 Verbose: True
DEBUG: 00:00:11.2060860 Type: Module
DEBUG: 00:00:11.2066922 Scope: CurrentUser
DEBUG: 00:00:11.2459090 Debug: True
DEBUG: 00:00:11.2469470 Name: PSMarkdown
DEBUG: 00:00:11.2475612 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:11.2481291 ProviderName: PowerShellGet
DEBUG: 00:00:11.2495059 INVOKING PowerShell Fn Install-Package with args NuGet|PSMarkdown|1.1|https://www.powershellgallery.com/api/v2/|Module that has length 1
DEBUG: 00:00:11.2508118 In PowerShellGet Provider - 'Install-Package'.
DEBUG: 00:00:11.2520996 In PowerShellGet Provider - 'Install-PackageUtility'.
DEBUG: 00:00:11.2528158 The FastPackageReference is 'NuGet|PSMarkdown|1.1|https://www.powershellgallery.com/api/v2/|Module'.
DEBUG: 00:00:11.2538842 OPTION: Verbose => True
DEBUG: 00:00:11.2545205 OPTION: Type => Module
DEBUG: 00:00:11.2552608 OPTION: Scope => CurrentUser
DEBUG: 00:00:11.2559193 OPTION: Debug => True
DEBUG: 00:00:11.2568280 OPTION: Name => PSMarkdown
DEBUG: 00:00:11.2575072 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:11.2583114 OPTION: ProviderName => PowerShellGet
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in '/home/ubuntu/.local/share/powershell/Modules'.
DEBUG: 00:00:11.2604836 ArtifactType is Module
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'PSMarkdown' with version '1.1' from the repository 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:11.3004016 Calling 'NuGet'::'InstallPackage', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:11.3014124 Calling 'NuGetRequest'::'GetPackageByFastpath', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:11.3023054 Calling 'NuGetRequest'::'ResolvePackageSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:11.3030965 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:11.3039088 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:12.7655953 Calling 'HttpClientPackageRepository'::'FindPackage', 'PSMarkdown'.
DEBUG: 00:00:12.7668490 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'' for ''.
DEBUG: 00:00:12.7688255 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:13.5924670 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:13.5945025 '2' packages received in the last request.
DEBUG: 00:00:13.5955038 'Package version' is '1.1'.
DEBUG: 00:00:13.5964395 'Request's Destination' is '/tmp/513334099'.
DEBUG: 00:00:13.5973651 Calling 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:13.5987915 Returning the call 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:13.6075026 Calling 'NuGetClient'::'InstallPackage'.
VERBOSE: InstallPackage' - name='PSMarkdown', version='1.1',destination='/tmp/513334099'
VERBOSE: DownloadPackage' - name='PSMarkdown', version='1.1',destination='/tmp/513334099/PSMarkdown.1.1/PSMarkdown.1.1.nupkg', uri='https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'.
VERBOSE: Completed downloading 'PSMarkdown'.
DEBUG: 00:00:14.8876628 Calling 'NuGetClient'::'InstallPackageLocal'.
VERBOSE: InstallPackageLocal' - name='PSMarkdown', version='1.1',destination='/tmp/513334099'
DEBUG: 00:00:14.9518673 /tmp/513334099/PSMarkdown.1.1/PSMarkdown.1.1.nupkg
DEBUG: 00:00:15.0804107 Returning the call 'NuGetClient'::'InstallPackageLocal'.
DEBUG: 00:00:15.1187747 Returning the call 'NuGetClient'::'InstallSinglePackage'.
DEBUG: 00:00:15.1480260 PowerShell Script 'PSModule' Function 'Install-Package' returns null.
DEBUG: 00:00:15.1509500 Done calling powershell «Install-Package» «PSModule»
@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 20, 2017

@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.
Is it possible to retry this module installation on an another Ubuntu 14.04.2 LTS machine?

`
PS /home/ubuntu> install-module psmarkdown -verbose -Debug -Scope CurrentUser -Force
DEBUG: 00:00:00.0000010 Calling New() : MethodName = 'GetDynamicOptions'

Confirm
Continue with this operation?
[Y] Yes [A] Yes to All [H] Halt Command [S] Suspend [?] Help (default is "Y"): A
DEBUG: 00:00:00.0051681 Force: True
DEBUG: 00:00:00.0052230 Name: psmarkdown
DEBUG: 00:00:00.0052465 Debug: True
DEBUG: 00:00:00.0052648 Verbose: True
DEBUG: 00:00:00.0080898 INVOKING PowerShell Fn Get-DynamicOptions with args Provider that has length 1
DEBUG: 00:00:00.0112761 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0150722 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0222763 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0223245 Force: True
DEBUG: 00:00:00.0223460 Name: psmarkdown
DEBUG: 00:00:00.0223637 Debug: True
DEBUG: 00:00:00.0223829 Verbose: True
DEBUG: 00:00:00.0251004 INVOKING PowerShell Fn Get-DynamicOptions with args Source that has length 1
DEBUG: 00:00:00.0275127 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0327670 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0392397 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0392874 Force: True
DEBUG: 00:00:00.0393132 Name: psmarkdown
DEBUG: 00:00:00.0393412 Debug: True
DEBUG: 00:00:00.0393657 Verbose: True
DEBUG: 00:00:00.0419125 INVOKING PowerShell Fn Get-DynamicOptions with args Package that has length 1
DEBUG: 00:00:00.0444230 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.0593747 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:00.0845686 Calling New() : MethodName = 'GetDynamicOptions'
DEBUG: 00:00:00.0846209 Force: True
DEBUG: 00:00:00.0846433 Name: psmarkdown
DEBUG: 00:00:00.0846631 Debug: True
DEBUG: 00:00:00.0846815 Verbose: True
DEBUG: 00:00:00.0880279 INVOKING PowerShell Fn Get-DynamicOptions with args Install that has length 1
DEBUG: 00:00:00.0900195 In PowerShellGet Provider - 'Get-DynamicOptions'.
DEBUG: 00:00:00.1021246 Done calling powershell «Get-DynamicOptions» «PSModule»
DEBUG: 00:00:01.2750304 Calling SearchForPackages. Name='psmarkdown'
VERBOSE: Using the provider 'PowerShellGet' for searching packages.
DEBUG: 00:00:01.3245762 PackageProvider::FindPackage with name psmarkdown
DEBUG: 00:00:01.3256291 Calling SearchForPackages After Select 1
DEBUG: 00:00:01.3760171 Calling New() : MethodName = 'FindPackage'
DEBUG: 00:00:01.3768066 Verbose: True
DEBUG: 00:00:01.3772880 Force: True
DEBUG: 00:00:01.3777813 Type: Module
DEBUG: 00:00:01.3782568 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:01.3787694 ProviderName: PowerShellGet
DEBUG: 00:00:01.3792345 Debug: True
DEBUG: 00:00:01.3803529 Name: psmarkdown
DEBUG: 00:00:01.3838775 Scope: CurrentUser
DEBUG: 00:00:01.3924656 INVOKING PowerShell Fn Find-Package with args System.String[], , , that has length 4
DEBUG: 00:00:01.5569071 In PowerShellGet Provider - 'Find-Package'.
DEBUG: 00:00:01.5684904 OPTION: Verbose => True
DEBUG: 00:00:01.5717792 OPTION: Force => True
DEBUG: 00:00:01.5730164 OPTION: Type => Module
DEBUG: 00:00:01.5739663 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:01.5749079 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:01.5970505 OPTION: Debug => True
DEBUG: 00:00:01.6079873 OPTION: Name => psmarkdown
DEBUG: 00:00:01.6091153 OPTION: Scope => CurrentUser
VERBOSE: The -Repository parameter was not specified. PowerShellGet will use all of the registered repositories.
VERBOSE: Getting the provider object for the PackageManagement Provider 'NuGet'.
VERBOSE: The specified Location is 'https://www.powershellgallery.com/api/v2/' and PackageManagementProvider is
'NuGet'.
DEBUG: 00:00:01.7719894 PackageProvider::FindPackage with name psmarkdown
DEBUG: 00:00:01.8508918 Calling 'NuGet'::'FindPackage' - name='psmarkdown', requiredVersion='',minimumVersion='',
maximumVersion='''.
DEBUG: 00:00:01.8963319 Iterating 'psmarkdown'.
DEBUG: 00:00:01.9927550 Create directory '/home/ubuntu/.config/NuGet'.
DEBUG: 00:00:01.9941849 Create a file '/home/ubuntu/.config/NuGet/nuget.config'.
DEBUG: 00:00:02.0039810 Calling 'NuGetRequest'::'RegisteredPackageSources', '/home/ubuntu/.config/NuGet/nuget.config'.
DEBUG: 00:00:02.0167833 Loading a configuration from file '/home/ubuntu/.config/NuGet/nuget.config'.
DEBUG: 00:00:02.0574144 Loaded a configuration from file '/home/ubuntu/.config/NuGet/nuget.config'.
DEBUG: 00:00:02.0618784 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:02.0629086 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in
'NuGet' provider.
DEBUG: 00:00:02.5603886 Source 'https://www.powershellgallery.com/api/v2/' is validated.
DEBUG: 00:00:02.5653420 Calling 'NuGetRequest'::'GetPackageById', 'psmarkdown'.
DEBUG: 00:00:02.7421435 Calling 'HttpClientPackageRepository'::'FindPackagesById', 'psmarkdown'.
DEBUG: 00:00:02.7431067 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='psmarkdown'' for ''.
DEBUG: 00:00:02.7836984 Downloading
'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='psmarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:03.2353200 Completed downloading
'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='psmarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:03.2687883 '2' packages received in the last request.
VERBOSE: Total package yield:'1' for the specified package 'psmarkdown'.
DEBUG: 00:00:03.3853536 Completed iterating for 'psmarkdown'.
DEBUG: 00:00:03.6816566 Done calling powershell «Find-Package» «PSModule»
DEBUG: 00:00:03.7694917 Calling New() : MethodName = 'GetInstalledPackages'
DEBUG: 00:00:03.7698828 Verbose: True
DEBUG: 00:00:03.7702061 Force: True
DEBUG: 00:00:03.7711159 Type: Module
DEBUG: 00:00:03.7751209 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:03.7803951 ProviderName: PowerShellGet
DEBUG: 00:00:03.7807403 Debug: True
DEBUG: 00:00:03.7810325 Name: psmarkdown
DEBUG: 00:00:03.7813507 Scope: CurrentUser
DEBUG: 00:00:03.7822663 INVOKING PowerShell Fn Get-InstalledPackage with args PSMarkdown, 1.1, , that has length 4
DEBUG: 00:00:03.7929005 In PowerShellGet Provider - 'Get-InstalledPackage'.
DEBUG: 00:00:03.7935689 OPTION: Verbose => True
DEBUG: 00:00:03.7941145 OPTION: Force => True
DEBUG: 00:00:03.7965433 OPTION: Type => Module
DEBUG: 00:00:03.7971595 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:03.7977372 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:03.8048772 OPTION: Debug => True
DEBUG: 00:00:03.8057254 OPTION: Name => psmarkdown
DEBUG: 00:00:03.8064865 OPTION: Scope => CurrentUser
DEBUG: 00:00:03.8377779 PowerShell Script 'PSModule' Function 'Get-InstalledPackage' returns null.
DEBUG: 00:00:03.8450291 Done calling powershell «Get-InstalledPackage» «PSModule»

Confirm
Are you sure you want to perform this action?
Performing the operation "Install-Module" on target "Version '1.1' of module 'PSMarkdown'".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): A
DEBUG: 00:00:04.9149768 Calling New() : MethodName = 'InstallPackage'
DEBUG: 00:00:04.9244842 Verbose: True
DEBUG: 00:00:04.9254954 Force: True
DEBUG: 00:00:04.9340990 Type: Module
DEBUG: 00:00:04.9350200 MessageResolver: Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:04.9407526 ProviderName: PowerShellGet
DEBUG: 00:00:04.9413292 Debug: True
DEBUG: 00:00:04.9472035 Name: psmarkdown
DEBUG: 00:00:04.9477107 Scope: CurrentUser
DEBUG: 00:00:04.9538535 INVOKING PowerShell Fn Install-Package with args
NuGet|PSMarkdown|1.1|https://www.powershellgallery.com/api/v2/|Module that has length 1
DEBUG: 00:00:04.9685337 In PowerShellGet Provider - 'Install-Package'.
DEBUG: 00:00:05.0879989 In PowerShellGet Provider - 'Install-PackageUtility'.
DEBUG: 00:00:05.0901575 The FastPackageReference is
'NuGet|PSMarkdown|1.1|https://www.powershellgallery.com/api/v2/|Module'.
DEBUG: 00:00:05.1134713 OPTION: Verbose => True
DEBUG: 00:00:05.1140798 OPTION: Force => True
DEBUG: 00:00:05.1146402 OPTION: Type => Module
DEBUG: 00:00:05.1289749 OPTION: MessageResolver => Microsoft.PowerShell.PackageManagement.Cmdlets.GetMessageString
DEBUG: 00:00:05.1295689 OPTION: ProviderName => PowerShellGet
DEBUG: 00:00:05.1301394 OPTION: Debug => True
DEBUG: 00:00:05.1328240 OPTION: Name => psmarkdown
DEBUG: 00:00:05.1366376 OPTION: Scope => CurrentUser
VERBOSE: The installation scope is specified to be 'CurrentUser'.
VERBOSE: The specified module will be installed in '/home/ubuntu/.local/share/powershell/Modules'.
DEBUG: 00:00:05.1845567 ArtifactType is Module
VERBOSE: The specified Location is 'NuGet' and PackageManagementProvider is 'NuGet'.
VERBOSE: Downloading module 'PSMarkdown' with version '1.1' from the repository
'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:05.3143555 Calling 'NuGet'::'InstallPackage',
'$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcn
kuY29tL2FwaS92Mi8=\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:05.3203241 Calling 'NuGetRequest'::'GetPackageByFastpath',
'$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcn
kuY29tL2FwaS92Mi8=\cG93ZXJzaGVsbGdldA=='.
DEBUG: 00:00:05.3369934 Calling 'NuGetRequest'::'ResolvePackageSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:05.3385879 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:05.3392903 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in
'NuGet' provider.
DEBUG: 00:00:05.9306362 Calling 'HttpClientPackageRepository'::'FindPackage', 'PSMarkdown'.
DEBUG: 00:00:05.9334807 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'' for ''.
DEBUG: 00:00:05.9392854 Downloading
'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:06.3290524 Completed downloading
'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:06.3307997 '2' packages received in the last request.
DEBUG: 00:00:06.3330130 'Package version' is '1.1'.
DEBUG: 00:00:06.3356237 'Request's Destination' is '/tmp/1812625289'.
DEBUG: 00:00:06.3544640 Calling 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:06.3969664 Returning the call 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:06.5426829 Calling 'NuGetClient'::'InstallPackage'. VERBOSE: InstallPackage' - name='PSMarkdown', version='1.1',destination='/tmp/1812625289' VERBOSE: DownloadPackage' - name='PSMarkdown', version='1.1',destination='/tmp/1812625289/PSMarkdown/PSMarkdown.nupkg', uri='https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0' VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'. VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'. VERBOSE: Completed downloading 'PSMarkdown'. DEBUG: 00:00:08.4909871 Calling 'NuGetClient'::'InstallPackageLocal'. VERBOSE: InstallPackageLocal' - name='PSMarkdown', version='1.1',destination='/tmp/1812625289' DEBUG: 00:00:08.9960490 /tmp/1812625289/PSMarkdown/PSMarkdown.nupkg DEBUG: 00:00:09.3727970 Returning the call 'NuGetClient'::'InstallPackageLocal'. DEBUG: 00:00:09.6711020 Returning the call 'NuGetClient'::'InstallSinglePackage'. VERBOSE: Module 'PSMarkdown' was installed successfully to path '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/1.1'. DEBUG: 00:00:09.9183699 Done calling powershell «Install-Package» «PSModule»

PS /home/ubuntu> $PSVersionTable

Name Value


PSVersion 6.0.0-beta
PSEdition Core
BuildVersion 3.0.0.0
CLRVersion
GitCommitId v6.0.0-beta.2
OS Linux 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014
Platform Unix
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
`

@ishu3101

This comment has been minimized.

ishu3101 commented Jun 20, 2017

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

DEBUG: 00:00:00.0000001 Calling 'NuGet'::'ResolvePackageSources'.
Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 00:00:00.0000974 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:00.0001546 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:01.0136311 Source 'https://www.powershellgallery.com/api/v2/' is validated.
DEBUG: 00:00:01.0137775 Yielding the package source: '«0»'. «NuGet» «Microsoft.PackageManagement.NuGetProvider.PackageSource»
DEBUG: 00:00:01.0138345 Yielding package source for https://www.powershellgallery.com/api/v2/ at location https://www.powershellgallery.com/api/v2/
DEBUG: 00:00:01.0138997 Returning the call 'NuGet'::'ResolvePackageSources'.
DEBUG: 00:00:03.7910969 Calling 'NuGet'::'ResolvePackageSources'.
DEBUG: 00:00:03.7912066 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:03.7912883 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:04.8386765 Source 'https://www.powershellgallery.com/api/v2/' is validated.
DEBUG: 00:00:04.8388258 Yielding the package source: '«0»'. «NuGet» «Microsoft.PackageManagement.NuGetProvider.PackageSource»
DEBUG: 00:00:04.8388848 Yielding package source for https://www.powershellgallery.com/api/v2/ at location https://www.powershellgallery.com/api/v2/
DEBUG: 00:00:04.8389487 Returning the call 'NuGet'::'ResolvePackageSources'.
DEBUG: 00:00:04.8391540 Calling SearchForPackages. Name='PSMarkdown'
VERBOSE: Using the provider 'NuGet' for searching packages.
DEBUG: 00:00:04.8405777 PackageProvider::FindPackage with name PSMarkdown
DEBUG: 00:00:04.8408842 Calling SearchForPackages After Select 1
DEBUG: 00:00:04.8435614 Calling 'NuGet'::'FindPackage' - name='PSMarkdown', requiredVersion='',minimumVersion='', maximumVersion='''.
DEBUG: 00:00:04.8437406 Iterating 'PSMarkdown'.
DEBUG: 00:00:04.8444193 There are '0' registered sources in 'NuGet' provider.
DEBUG: 00:00:04.8445363 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:05.8708002 Source 'https://www.powershellgallery.com/api/v2/' is validated.
DEBUG: 00:00:05.8709615 Calling 'NuGetRequest'::'GetPackageById', 'PSMarkdown'.
DEBUG: 00:00:06.2856909 Calling 'HttpClientPackageRepository'::'FindPackagesById', 'PSMarkdown'.
DEBUG: 00:00:06.2858344 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'' for ''.
DEBUG: 00:00:06.2860153 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:07.1006676 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:07.1010877 '2' packages received in the last request.
VERBOSE: Total package yield:'1' for the specified package 'PSMarkdown'.
DEBUG: 00:00:07.1020055 Completed iterating for 'PSMarkdown'.
DEBUG: 00:00:07.1073923 Calling 'NuGet'::'GetInstalledPackages' - name='PSMarkdown', requiredVersion='1.1',minimumVersion='', maximumVersion='''.
Confirm
Are you sure you want to perform this action?
Performing the operation "Install Package" on target "Package 'PSMarkdown' version '1.1' from 'https://www.powershellgallery.com/api/v2/'.".
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help (default is "Y"): A
DEBUG: 00:00:09.0598211 Calling 'NuGet'::'InstallPackage', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8='.
DEBUG: 00:00:09.0599299 Calling 'NuGetRequest'::'GetPackageByFastpath', '$aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8=\UFNNYXJrZG93bg==\MS4x\aHR0cHM6Ly93d3cucG93ZXJzaGVsbGdhbGxlcnkuY29tL2FwaS92Mi8='.
DEBUG: 00:00:09.0600573 Calling 'NuGetRequest'::'ResolvePackageSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:09.0601125 Calling 'NuGetRequest'::'FindRegisteredSource', 'https://www.powershellgallery.com/api/v2/'.
DEBUG: 00:00:09.0601660 Source 'https://www.powershellgallery.com/api/v2/' is not one of the registered sources in 'NuGet' provider.
DEBUG: 00:00:10.4975757 Calling 'HttpClientPackageRepository'::'FindPackage', 'PSMarkdown'.
DEBUG: 00:00:10.4977028 Calling 'NuGetClient'::'FindPackage'.
VERBOSE: Searching repository 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'' for ''.
DEBUG: 00:00:10.4978437 Downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:11.3275599 Completed downloading 'https://www.powershellgallery.com/api/v2/FindPackagesById()?id='PSMarkdown'&$skip=0&$top=40'.
DEBUG: 00:00:11.3281188 '2' packages received in the last request.
DEBUG: 00:00:11.3283451 'Package version' is '1.1'.
DEBUG: 00:00:11.3293159 'Request's Destination' is '/home/ubuntu/.local/share/powershell/Modules/'.
DEBUG: 00:00:11.3294077 Calling 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:11.3296019 Returning the call 'NuGetClient'::'GetPackageDependencies'.
DEBUG: 00:00:11.3297383 Calling 'NuGetClient'::'InstallPackage'.
VERBOSE: InstallPackage' - name='PSMarkdown', version='1.1',destination='/home/ubuntu/.local/share/powershell/Modules/'
VERBOSE: DownloadPackage' - name='PSMarkdown', version='1.1',destination='/home/ubuntu/.local/share/powershell/Modules/PSMarkdown.1.1/PSMarkdown.1.1.nupkg', uri='https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'
VERBOSE: Downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'.
VERBOSE: Completed downloading 'https://www.powershellgallery.com/api/v2/package/PSMarkdown/1.1.0'.
VERBOSE: Completed downloading 'PSMarkdown'.
DEBUG: 00:00:12.3720670 Calling 'NuGetClient'::'InstallPackageLocal'.
VERBOSE: InstallPackageLocal' - name='PSMarkdown', version='1.1',destination='/home/ubuntu/.local/share/powershell/Modules/'
DEBUG: 00:00:12.3721923 /home/ubuntu/.local/share/powershell/Modules/PSMarkdown.1.1/PSMarkdown.1.1.nupkg
DEBUG: 00:00:12.3751368 Returning the call 'NuGetClient'::'InstallPackageLocal'.
DEBUG: 00:00:12.3760945 Returning the call 'NuGetClient'::'InstallSinglePackage'.

Name                           Version          Source                           Summary
----                           -------          ------                           -------
PSMarkdown                     1.1              https://www.powershellgallery... A Powershell Module to convert from a PowerShell object to a Markdown table and back

PS /home/ubuntu/> Test-ModuleManifest '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/PSMarkdown.psd1' -verbose

Test-ModuleManifest : The specified module '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/PSMarkdown.psd1' 
was not loaded because no valid module file was found in any module directory.
At line:1 char:1
+ Test-ModuleManifest '/home/ubuntu/.local/share/powershell/Modules/PSM ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (/home/ubuntu/.l...PSMarkdown.psd1:String) [Test-ModuleManifest], 
FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.TestModuleManifestCommand
Test-ModuleManifest : The specified module '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown/PSMarkdown.psd1' was not loaded because no valid module file was found in any
module directory.
At line:1 char:1
+ Test-ModuleManifest '/home/ubuntu/.local/share/powershell/Modules/PSM ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ResourceUnavailable: (/home/ubuntu/.l...PSMarkdown.psd1:String) [Test-ModuleManifest], FileNotFoundException
    + FullyQualifiedErrorId : Modules_ModuleNotFound,Microsoft.PowerShell.Commands.TestModuleManifestCommand

@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 20, 2017

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
@ishu3101

This comment has been minimized.

ishu3101 commented Jun 20, 2017

PS /home/ubuntu/> Get-ChildItem '/home/ubuntu/.local/share/powershell/Modules/' -Recurse
PS /home/ubuntu/> Get-Module -ListAvailable PSMarkdown
PS /home/ubuntu/> Get-PackageProvider

Name                     Version          DynamicOptions
----                     -------          --------------
NuGet                    2.8.5.209        Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet            1.1.3.1          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, Filter, Tag, Includes, DscResource, RoleCa...

PS /home/ubuntu/> Get-PackageProvider -ListAvailable

Name                     Version          DynamicOptions
----                     -------          --------------
NuGet                    2.8.5.209        Destination, ExcludeVersion, Scope, SkipDependencies, Headers, FilterOnTag, Contains, AllowPrereleaseVersions, ConfigFile, SkipValidate
PowerShellGet            1.1.3.1          PackageManagementProvider, Type, Scope, AllowClobber, SkipPublisherCheck, InstallUpdate, NoPathUpdate, Filter, Tag, Includes, DscResource, RoleCa...

PS /home/ubuntu/> Get-Module PowerShellGet,PackageManagement

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.1.4.0    PackageManagement                   {Find-Package, Find-PackageProvider, Get-Package, Get-PackageProvider...}

PS /home/ubuntu/> Get-Module PowerShellGet,PackageManagement -ListAvailable

Directory: /opt/microsoft/powershell/6.0.0-beta.2/Modules


ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Script     1.1.4.0    PackageManagement                   {Find-Package, Get-Package, Get-PackageProvider, Get-PackageSource...}
Script     1.1.3.1    PowerShellGet                       {Install-Module, Find-Module, Save-Module, Update-Module...}

PS /home/ubuntu/> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.0.0-beta
PSEdition                      Core
BuildVersion                   3.0.0.0
CLRVersion
GitCommitId                    v6.0.0-beta.2
OS                             Linux 4.9.17-c9 #1 SMP Thu Mar 23 01:38:54 UTC 2017
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0
@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 20, 2017

@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.

@ishu3101

This comment has been minimized.

ishu3101 commented Jun 21, 2017

When I run the command below

Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/ubuntu/.local/share/powershell/Modules/' -Verbose -Debug -ExcludeVersion -Force

it install the PSMarkdown module but the name of the folder is PSMarkdown.1.1, so running

Test-ModuleManifest '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown.1.1/PSMarkdown.psd1' -verbose

gives the following output

VERBOSE: Loading module from path '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown.1.1/PSMarkdown.psm1'.
VERBOSE: Loading module from path '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown.1.1/ConvertTo-Markdown.ps1'.
VERBOSE: Loading module from path '/home/ubuntu/.local/share/powershell/Modules/PSMarkdown.1.1/ConvertFrom-Markdown.ps1'.

ModuleType Version    Name                                ExportedCommands                                                                                                         
---------- -------    ----                                ----------------                                                                                                         
Script     1.1        PSMarkdown                          {ConvertTo-Markdown, ConvertFrom-Markdown}                                                                               

When I try to install another Module such as FormatMarkdown & PSHTMLTable using Install-Module ModuleName -Scope CurrentUser the same thing happened as this original issue.

@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Jun 21, 2017

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
@jianyunt

This comment has been minimized.

Contributor

jianyunt commented Jun 21, 2017

@ishu3101, did install-package or module worked on you machine with earlier version of PSCore such as 6.0.0-alpha before?
I cannot repro it. I can try some more. here is what I tried. Could you please try the following on your machine?

launch a new terminal
 Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/jianyunt/packages' -Verbose -Debug -ExcludeVersion -Force
 Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/jianyunt/packages' -Verbose -Debug -Force

Get-Package -provider nuget -destination /home/jianyunt/packages -allversions

Name            Version        Source                                             ProvierName
-----                -------          ------                                             --------------
PSMarkdown     1.1             /home/jianyunt/packages/...            NuGet
PSMarkdown     1.1             /home/jianyunt/packages/...            NuGet
cd  /home/jianyunt/packages
PS  /home/jianyunt/packages>dir

    Directory:  /home/jianyunt/packages

Mode                                   LastWriteTime                    Length   Name
-------                                   ----------------                     -----         -----
d-----                                 6/21/17/  9:37 AM                                 PSMarkdown
d-----                                  6/21/17/  9:37 AM                                 PSMarkdown.1.1
@ishu3101

This comment has been minimized.

ishu3101 commented Jun 21, 2017

No, it did not work with earlier version of PSCore as mentioned here #2165.

When, I run

Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/jianyunt/packages' -Verbose -Debug -ExcludeVersion -Force
Install-Package PSMarkdown -Provider NuGet -Source 'https://www.powershellgallery.com/api/v2/' -Destination '/home/jianyunt/packages' -Verbose -Debug -Force

it says

Sudo rights are required to install packages in '/home/jianyunt/packages'. Try again by launching powershell with sudo, or install in                                               '/home/ubuntu/.local/share/PackageManagement/NuGet/Packages' by adding "-Scope CurrentUser" to your command.

After running the above command with sudo, and then running Get-Package -provider nuget -destination /home/jianyunt/packages -allversions, I get the following output

Name                           Version          Source                           ProviderName                                                                                       
----                           -------          ------                           ------------                                                                                      
PSMarkdown                     1.1              /home/jianyunt/packages/PSMar... NuGet

PS > dir /home/jianyunt/packages

    Directory: /home/jianyunt/packages

Mode                LastWriteTime         Length Name                                                                                                                              
----                -------------         ------ ----                                                                                                                              
d-----          6/21/17   9:59 PM                PSMarkdown.1.1                                                                                                                    

I have installed PSCore and been having this issue while using Powershell on a Cloud IDE

@brywang-msft

This comment has been minimized.

brywang-msft commented Jun 22, 2017

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 cat /etc/*-release. I'll try some other stuff in the meantime.

@ishu3101

This comment has been minimized.

ishu3101 commented Jun 28, 2017

Running the command cat /etc/*-release, gives the following output

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.2 LTS"
NAME="Ubuntu"
VERSION="14.04.2 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.2 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
@MichalTaratuta

This comment has been minimized.

MichalTaratuta commented Nov 7, 2017

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?

@brywang-msft

This comment has been minimized.

brywang-msft commented Nov 7, 2017

@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.

@MaximoTrinidad

This comment has been minimized.

MaximoTrinidad commented Nov 7, 2017

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.

## - Check that the NuGet feed is available and has the SMO package:
Find-Package -Name Microsoft.SqlServer.SqlManagementObjects

## - Install latest SMO package from NuGet:
Install-Package -Name Microsoft.sqlserver.SqlManagementObjects -Scope CurrentUser

I had no issues.

OS:
Windows 10 Insider Build 17025
Ubuntu 16.04.3 LTS (Xenial Xerus)
PowerShell 6.0.0-beta.9

@bmanikm

This comment has been minimized.

Contributor

bmanikm commented Sep 9, 2018

This issue got resolved in PowerShellGet with PowerShell/PowerShellGet#313.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment