azure - 如何修复 Azure Cloud Shell 上的核心转储错误?
问题描述
每当我启动 Azure Cloud shell 时,它都会崩溃并出现以下错误。任何想法如何摆脱这个错误。任何帮助表示赞赏。
Requesting a Cloud Shell.Succeeded.
Connecting terminal...
Unhandled exception. System.TypeInitializationException: The type initializer for 'System.Management.Automation.Configuration.PowerShellConfig' threw an exception.
---> System.TypeInitializationException: The type initializer for 'System.Management.Automation.Platform' threw an exception.
---> System.IO.IOException: Bad message
at System.IO.FileSystem.CreateDirectory(String fullPath)
at System.IO.Directory.CreateDirectory(String path)
at System.Management.Automation.Platform.SelectProductNameForDirectory(XDG_Type dirpath) in /PowerShell/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs:line 343
at System.Management.Automation.Platform..cctor() in /PowerShell/src/System.Management.Automation/CoreCLR/CorePsPlatform.cs:line 145
--- End of inner exception stack trace ---
at System.Management.Automation.Configuration.PowerShellConfig..ctor() in /PowerShell/src/System.Management.Automation/engine/PSConfiguration.cs:line 91
at System.Management.Automation.Configuration.PowerShellConfig..cctor() in /PowerShell/src/System.Management.Automation/engine/PSConfiguration.cs:line 57
--- End of inner exception stack trace ---
at System.Management.Automation.Utils.GetPolicySettingFromConfigFile[T](ConfigScope[] preferenceOrder) in /PowerShell/src/System.Management.Automation/engine/Utils.cs:line 784
at System.Management.Automation.Utils.GetPolicySetting[T](ConfigScope[] preferenceOrder) in /PowerShell/src/System.Management.Automation/engine/Utils.cs:line 760
at Microsoft.PowerShell.CommandLineParameterParser.GetConfigurationNameFromGroupPolicy() in /PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/CommandLineParameterParser.cs:line 578
at Microsoft.PowerShell.ConsoleHost.ParseCommandLine(String[] args) in /PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs:line 289
at Microsoft.PowerShell.UnmanagedPSEntry.Start(String[] args, Int32 argc) in /PowerShell/src/Microsoft.PowerShell.ConsoleHost/host/msh/ManagedEntrance.cs:line 82
at Microsoft.PowerShell.ManagedPSEntry.Main(String[] args) in /PowerShell/src/powershell/Program.cs:line 71
Aborted (core dumped)
解决方案
这可能是您的个人资料中的某些内容或损坏的云驱动器图像。要“恢复出厂设置”您的 cloudshell,请执行以下操作:
- 导航到用于 cloudshell 存储的资源组
- 导航到此资源组中的存储帐户
- 导航到“文件共享”,您应该会看到一个名为“cloudshellshare”的共享。
- 删除此共享。
- 重新启动/启动 cloudshell。这应该给工厂一个新鲜的云壳。
推荐阅读
- python - 在 Ubuntu 上使用 pyinstaller 构建可执行文件时出错
- matlab - 自定义 3D 对象的数据光标
- python - 创建矩阵的最快方法是彼此的乘积
- sql - 在以下版本的 sql server 2017 中连接来自不同表的 sting
- gdb - 在 gdb 中按 ctrl-c 时 qemu 退出
- redis - redis中如何删除Bloom filter过期数据
- angular - 如何解决“CORS 策略:对预检请求的响应未通过访问控制检查”。不添加浏览器插件
- abap - 为什么左外连接像 ABAP CDS 视图和自定义表上的内连接一样工作?
- ios - 如何在iOS swift中实现带有月份、日期和时间的自定义选择器?
- c++ - 字符串作为容器的成员,容器是 C++ 类的成员