Skip to content
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

How to install PowerShell and Azure RM SDK on Ubuntu 14.04? #239

Closed
jgodse opened this issue Nov 8, 2016 · 7 comments
Closed

How to install PowerShell and Azure RM SDK on Ubuntu 14.04? #239

jgodse opened this issue Nov 8, 2016 · 7 comments

Comments

@jgodse
Copy link

jgodse commented Nov 8, 2016

I have a virgin system with Ubuntu 14.04, and Powershell (6.0.0-alpha) (GitCommitId=v6.0.0-alpha.12). I installed powershell successfully by following instructions on the Powershell Git repository. For the Azure Powershell SDK, I tried various places but nobody's installation instruction works for Ubuntu 14.04.

I would like to also install the Powershell Azure SDK (using Powershell) to manage my Azure resources. Does anybody have a repeatable set of instructions for Ubuntu 14.04 which will get me going with the Azure SDK.

Some system information:

PS /home/jgodse/tmp/powershellstuff> $psversiontable

Name                           Value
----                           -----
PSVersion                      6.0.0-alpha
PSEdition                      Core
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   3.0.0.0
GitCommitId                    v6.0.0-alpha.12
CLRVersion
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1

PS /home/jgodse/tmp/powershellstuff> uname -a
Linux jgodse-ws1 4.4.0-45-generic #66~14.04.1-Ubuntu SMP Wed Oct 19 15:05:38 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
PS /home/jgodse/tmp/powershellstuff> which powershell
/usr/bin/powershell
PS /home/jgodse/tmp/powershellstuff> which Install-Package
PS /home/jgodse/tmp/powershellstuff> Install-PackageProvider -Name NuGet -ForceBootstrap
Install-PackageProvider : Unable to find repository with SourceLocation ''. Use Get-PSRepository to see all available repositories.
At line:1 char:1
+ Install-PackageProvider -Name NuGet -ForceBootstrap
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception
    + FullyQualifiedErrorId :      RegisterPackageSourceRequired,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider

PS /home/jgodse/tmp/powershellstuff> Get-PSRepository
PackageManagement\Get-PackageSource : Unable to find module providers (PowerShellGet).
At /opt/microsoft/powershell/6.0.0-alpha.12/Modules/PowerShellGet/PSModule.psm1:4509 char:31
+ ... ckageSources = PackageManagement\Get-PackageSource @PSBoundParameters
+                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Microsoft.Power...etPackageSource:GetPackageSource) [Get-PackageSource], Exception
    + FullyQualifiedErrorId :  UnknownProviders,Microsoft.PowerShell.PackageManagement.Cmdlets.GetPackageSource

PS /home/jgodse/tmp/powershellstuff>
@jianyunt
Copy link
Contributor

@jgodse, PackageManagement in PowerShell Alpha12 is broken. Please use alpha11. We are working on the fix. Sorry for the inconvenience .

@jgodse
Copy link
Author

jgodse commented Nov 10, 2016

Thanks for the heads-up. How do I install or use Alpha 11? Or, conversely, how long can I expect it to take for Alpha12+ to have package management working?

@jianyunt
Copy link
Contributor

You can find alpha11 from https://github.com/PowerShell/PowerShell/releases and follow the instructions to get it installed.

NuGet provider is included in the install, you do not need to run install-packageprovider once installed the powershell alpha. So you can run find-module xjea for example.

@gfilicetti
Copy link

I'm also running into trouble with alpha12 as I need to get the Azure modules installed.

@jianyunt
Copy link
Contributor

OneGet should work on powershell v6.0.0-alpha.13.
There is a known issue: proxy is broke due to the underlie .net CoreCLR issue. If you are not using proxy server, you can use OneGet on alpha.13.

@brywang-msft
Copy link
Contributor

@jgodse Can you confirm if there's any further issues?

@jianyunt
Copy link
Contributor

jianyunt commented Sep 6, 2017

@jgodse @gfilicetti Can you please let us know which version of PowerShell are you using in your environment. If possible please use the latest PowerShell Beta version.

Note that the regular AzureRM modules do not work in PowerShell core. You have to use separate NetCore versions. An example Azure demo is at https://github.com/PowerShell/PowerShell/blob/master/demos/Azure/Azure-Demo.ps1

@jianyunt jianyunt closed this as completed Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants