安装 Azure RM Ubuntu 16.04 时遇到问题

Trouble installing Azure RM Ubuntu 16.04

我正在使用 Ubuntu 16.04 并提升 PS shell。安装了合适版本的 PowershellGet。

https://docs.microsoft.com/en-us/powershell/azure/install-azurerm-ps?view=azurermps-4.1.0

当尝试按照上述说明操作时,我收到以下错误消息:

PackageManagement\Install-Package:软件包 'AzureRM.profile' 安装失败,因为:/tmp/1323106488/AzureRM.profile/AzureRM.profile.nuspec 在 /opt/microsoft/powershell/6.0.0alpha。 14/Modules/PowerShellGet/1.1.2.0/PSModule.psm1:1809 char:21 + ... $null = PackageManagement\Install-Package @PSBoundParameters + ~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidResult: (AzureRM.profile:String) [Install-Package], 异常+ FullyQualifiedErrorId:无法安装包“{0}”,因为:{1},Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage

我错过了一步吗?

基本上,您是在将 windows 教程应用到 ubuntu 框,并想知道为什么它不起作用...

Install-Package -Name AzureRM.NetCore.Preview -Source https://www.powershellgallery.com/api/v2 -ProviderName NuGet -ExcludeVersion -Destination <Folder you want this to be installed>

您可以按照 this article 安装 AzureRM.Profile 和 AzureRm.Resources(我认为这些是目前唯一移植的)。

有一个实验性的 docker 图片和一些其他模块,我现在好像找不到了

docker run -it twitchax/azure-powershell-core

给你;这个有:

AzureRM.Compute.Netcore
AzureRM.Network.Netcore
AzureRM.Profile.Netcore
AzureRM.Resources.Netcore
AzureRM.Storage.Netcore
AzureRM.Tags.Netcore
AzureRM.Websites.Netcore