如何在Apple M1上获得Azure功能PowerShell?
您中的某人是否有针对Apple M1的Azure功能Powershell的工作解决方案?
我无法正常工作。到目前为止,我尝试过的是:
本地方法:
- .NET CORE 3.1 SDK
- 安装Azure功能工具4
- 使用HTTP触发器函数为PowerShell创建了Azure函数
当我运行“ Func start”时,
An assembly specified in the application dependencies manifest (Microsoft.Azure.Functions.PowerShellWorker.deps.json) was not found:
package: 'runtime.osx-x64.runtime.native.System.IO.Ports', version: '4.7.0'
安装 :
- 创建了来自“ mcr.microsoft.com/azure-funtions/powershell:4-powershell7.2”的Docker Image。我已经尝试过有或没有buildx -platform linux/amd64
- 启动了图像(也有和没有 - platform linux/amd64),
然后我会遇到以下错误:
fail: Host.Startup[515]
A host error has occurred during startup operation '6c64e86e-4fff-4784-a6b1-c86a60ac9c8e'.
System.IO.IOException: Function not implemented
at System.IO.FileSystemWatcher.StartRaisingEvents()
at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
at Microsoft.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher.InitializeWatcher() in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 64
at Microsoft.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher..ctor(String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 43
at Microsoft.Azure.WebJobs.Script.Eventing.File.FileWatcherEventSource..ctor(IScriptEventManager eventManager, String source, String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/Eventing/File/FileWatcherEventSource.cs:line 28
at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.InitializeFileWatchers() in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 157
at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.StartAsync(CancellationToken cancellationToken) in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 93
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.UnsynchronizedStartHostAsync(ScriptHostStartupOperation activeOperation, Int32 attemptCount, JobHostStartupMode startupMode) in /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs:line 310
是否有任何方法可以使其在Apple M1上工作?
事先感谢您的帮助!
问候 亚历克斯
does someone of you has a working solutions for Azure Function PowerShell for an Apple M1?
I was not able to get it working. What I've tried so far:
Local approach:
- Installed .NET Core 3.1 SDK
- Installed Azure Function Tools 4
- Created Azure Function for PowerShell with a HTTP trigger function
When I run "func start" I'm getting the following error message:
An assembly specified in the application dependencies manifest (Microsoft.Azure.Functions.PowerShellWorker.deps.json) was not found:
package: 'runtime.osx-x64.runtime.native.System.IO.Ports', version: '4.7.0'
Docker approach:
- Created Docker image from "mcr.microsoft.com/azure-functions/powershell:4-powershell7.2". I've tried it with and without buildx --platform linux/amd64
- Started the image (also with and without --platform linux/amd64)
Then I get the following error:
fail: Host.Startup[515]
A host error has occurred during startup operation '6c64e86e-4fff-4784-a6b1-c86a60ac9c8e'.
System.IO.IOException: Function not implemented
at System.IO.FileSystemWatcher.StartRaisingEvents()
at System.IO.FileSystemWatcher.StartRaisingEventsIfNotDisposed()
at System.IO.FileSystemWatcher.set_EnableRaisingEvents(Boolean value)
at Microsoft.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher.InitializeWatcher() in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 64
at Microsoft.Azure.WebJobs.Script.IO.AutoRecoveringFileSystemWatcher..ctor(String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/IO/AutoRecoveringFileSystemWatcher.cs:line 43
at Microsoft.Azure.WebJobs.Script.Eventing.File.FileWatcherEventSource..ctor(IScriptEventManager eventManager, String source, String path, String filter, Boolean includeSubdirectories, WatcherChangeTypes changeTypes, ILoggerFactory loggerFactory) in /src/azure-functions-host/src/WebJobs.Script/Eventing/File/FileWatcherEventSource.cs:line 28
at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.InitializeFileWatchers() in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 157
at Microsoft.Azure.WebJobs.Script.WebHost.FileMonitoringService.StartAsync(CancellationToken cancellationToken) in /src/azure-functions-host/src/WebJobs.Script.WebHost/FileMonitoringService.cs:line 93
at Microsoft.Extensions.Hosting.Internal.Host.StartAsync(CancellationToken cancellationToken)
at Microsoft.Azure.WebJobs.Script.WebHost.WebJobsScriptHostService.UnsynchronizedStartHostAsync(ScriptHostStartupOperation activeOperation, Int32 attemptCount, JobHostStartupMode startupMode) in /src/azure-functions-host/src/WebJobs.Script.WebHost/WebJobsScriptHostService.cs:line 310
Is there any way to get it working on an Apple M1?
Thanks in advance for your help!
Regards
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此时,Apple M1不是正式支持的,但这可能有效:
local.settings.json
文件中,设置functions_worker_runtime_version
to“ 7.2”
。 Powershell 7.0没有(也可能不会)在Apple M1上得到支持。Apple M1 is not officially supported at this point, but this may work:
local.settings.json
file, setFUNCTIONS_WORKER_RUNTIME_VERSION
to"7.2"
. PowerShell 7.0 is not (and probably will not be) supported on Apple M1.