简体   繁体   English

otool -L:不是Mach-O文件类型

[英]otool -L: Not a Mach-O filetype

I'm trying to use Magick.Net on OS X, and I've been following this guide to do so. 我正在尝试在OS X上使用Magick.Net,并且一直遵循指南进行操作。 It's a guide for Linux, but OS X is Unix so I assume that it should work the same. 它是Linux的指南,但是OS X是Unix,因此我认为它应该可以正常工作。

I think I'm close to making it work but I've got a problem with the dependencies, and I want to see the dependencies of a .so file. 我认为我即将使其工作,但是依赖项存在问题,我想查看.so文件的依赖项。
So I Googled how to look a the dependencies of a .so file on Linux, and stumbled upon otool -L . 因此,我在Google上搜索了如何查找.so文件的依赖项,并偶然发现了otool -L
This tool looks at the depdencies and also sees if it can find the dependencies it needs , which is what I want because it makes everything easier. 该工具查看依赖关系 ,还查看是否可以找到所需的依赖关系 ,这正是我想要的,因为它使一切变得更加容易。

But when I run otool -L Magick.NET-Q8-x64.dll.so , I get the error message Not a Mach-O filetype 但是,当我运行otool -L Magick.NET-Q8-x64.dll.so ,出现错误消息Not a Mach-O filetype

So what do I do now? 那我现在该怎么办? Is there an alternative I can use or am I using the program wrong? 我可以使用其他替代方法吗,或者我使用该程序是否错误?

OS X is Unix so I assume that it should work the same OS X是Unix,因此我认为它应该能正常工作

Here lies the issue. 问题就在这里。 macOS is Unix based, but its executable file format ( Mach-O ) is unique to macOS / OS X and its predecessor NeXT. macOS是基于Unix的,但是其可执行文件格式( Mach-O )对于macOS / OS X及其前身NeXT是唯一的。 Otool on macOS expects a Mach-O file, not a linux .so file as they're not binary compatible. macOS上的Otool需要一个Mach-O文件,而不是linux .so文件,因为它们与二进制文件不兼容。

As the guide you linked to states it is required to have a Linux build machine running ; 作为链接的指南,声明必须有运行Linux的构建机器 however, L inux I s N ot U nix. 然而,L inux下 S N OTÚ尼克斯。

Is there an alternative I can use 有没有我可以使用的替代方法

Follow the instructions in the guide, which states a requirement is a Linux machine and run otool under Linux. 请按照指南中的说明进行操作,该说明指出要求是一台Linux计算机,并在Linux下运行otool

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM