首页 文章

找不到文件:/usr/lib/system/libdnsinfo.dylib for architecture i386

提问于
浏览
0

我使用的是XCode 4.6.3的MAC 10.9并安装了命令行工具

我正在尝试使用python setup.py构建编译pycrypto-2.1.0并获得以下错误

-----------------------------------------------------------------------------
ld: warning: ignoring file build/temp.macosx-10.6-intel-2.7/src/MD2.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-2.7/src/MD2.o
ld: file not found: /usr/lib/system/libdnsinfo.dylib for architecture i386
collect2: ld returned 1 exit status
ld: file not found: /usr/lib/system/libdnsinfo.dylib for architecture x86_64
collect2: ld returned 1 exit status
------------------------------------------------------------------------------------

找到了

$ locate libdnsinfo.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/system/libdnsinfo.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/system/libdnsinfo.dylib
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system/libdnsinfo.dylib

这些路径也被添加到PATH中 .

以下是命令和错误


$ python setup.py构建运行构建运行build_py运行build_ext警告:未找到GMP库;没有构建Crypto.PublicKey._fastmath . 构建'Crypto.Hash.MD2'扩展gcc-4.2 -I / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.7.sdk / usr / include / -I / Applications / Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -I / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs /MacOSX10.7.sdk/usr/include/c /4.2.1/ -O3 -fomit-frame-pointer -Isrc / -I / Library / Frameworks / Python.framework / Versions / 2.7 / include / python2.7 -c src / MD2.c -o build / temp.macosx-10.6-intel-2.7 / src / MD2.o gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g -L / Applications / Xcode.app / Contents /Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib -I / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.7.sdk / usr / include / -I / Applications / Xcode.app / Contents / Developer / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.7.sdk / usr / include / -I / Applications / Xcode.app / Contents / D eveloper / Platforms / MacOSX.platform / Developer / SDKs / MacOSX10.7.sdk / usr / include / c /4.2.1/ build / temp.macosx-10.6-intel-2.7 / src / MD2.o -o build / lib .macosx-10.6-intel-2.7 / Crypto / Hash / MD2.so ld:警告:忽略文件build / temp.macosx-10.6-intel-2.7 / src / MD2.o,文件是为不支持的文件格式构建的(0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0)这不是被链接的架构(i386):build / temp.macosx-10.6-intel-2.7 / src / MD2.o ld:找不到文件:/usr/lib/system/libdnsinfo.dylib for architecture i386 collect2:ld返回1退出状态ld:找不到文件:/usr/lib/system/libdnsinfo.dylib for architecture x86_64

collect2:ld返回1退出状态

有什么想法解决这个问题?

3 回答

  • 0

    在eclipse中遇到同样的问题以下为我工作:

    1) Find location of lib

    locate libdnsinfo.dynlib
    

    2) Copy and paste location to

    project > properties > C/C++ Build > Settings > MacOS X C Linker > Libraries > Library Search Path
    
  • 0

    使用libdns_services代替,最新的sdk不再支持libdnsinfo.dylib .

  • 0

    我在尝试将openssl库链接到一个简单的c应用程序时升级到osx 10.9后也遇到了这个问题 .

    对我有用的快速解决方案是将其中一个libdnsinfo文件链接到/ usr / lib / system

    例如:

    ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/system/libdnsinfo.dylib /usr/lib/system/libdnsinfo.dylib
    

相关问题