Skip to content

Cant run on Macbook M1 Pro #4

@birliks

Description

@birliks

Hello fbarresi,

when i try to run SoftPlc on Macbook Pro M1, i am getting below error. i have already move files from native folder to net6.0 folder.
if you have any suggestion it would be great.

PS /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc> dotnet run bin\Debug\net6.0\SoftPlc.dll --plcPort=102 --urls="http://localhost:8080/"
Initializing plc service...
Unhandled exception. System.DllNotFoundException: Unable to load shared library 'snap7' or one of its dependencies. In order to help diagnose loading problems, consider setting the DYLD_PRINT_LIBRARIES environment variable: dlopen(libsnap7, 0x0001): tried: 'libsnap7' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibsnap7' (no such file), '/usr/lib/libsnap7' (no such file, not in dyld cache), 'libsnap7' (no such file), '/usr/local/lib/libsnap7' (no such file), '/usr/lib/libsnap7' (no such file, not in dyld cache)
at SoftPlc.S7Server.Srv_Create()
at SoftPlc.S7Server..ctor() in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Snap7/snap7.net.cs:line 1918
at SoftPlc.Services.PlcService..ctor(IConfiguration configuration) in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Services/PlcService.cs:line 23
at System.RuntimeMethodHandle.InvokeMethod(Object target, Span1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, RuntimeResolverContext context) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSiteMain(ServiceCallSite callSite, TArgument argument)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitRootCache(ServiceCallSite callSite, RuntimeResolverContext context)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor2.VisitCallSite(ServiceCallSite callSite, TArgument argument) at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.Resolve(ServiceCallSite callSite, ServiceProviderEngineScope scope) at Microsoft.Extensions.DependencyInjection.ServiceProvider.CreateServiceAccessor(Type serviceType) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at Program.

$(String[] args) in /Users/xxxxx/VisualStudioProjects/_Custom/SoftPlc/SoftPlc/Program.cs:line 48

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency filequestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions