提问者:小点点

找不到文件:/usr/lib/system/libdnsinfo。用于体系结构i386的动态库


我在MAC 10.9与XCode 4.6.3和命令行工具安装

我正在尝试编译pycrypto-2.1。0使用python安装程序。py构建和获取以下错误


-----------------------------------------------------------------------------
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。

以下是命令和错误

$pythonsetup.py构建运行构建运行build_py运行build_ext警告:未找到GMP库;未构建加密。公开密钥。_fastmath建设'加密。哈希。MD2'扩展gcc-4.2-我/应用程序/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/-我/应用程序/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/-我/应用程序/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/c /4.2.1/-O3-fomit-frame-指针-Isrc/-我/库/Fraframe/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-未定义dynamic_lookup-arch i386-archx86_64-g-L/应用程序/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib-I/应用程序/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/-I/应用程序/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/-我/应用程序/Xcode.app/Contents/Developer/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 build/lib.macosx-10.6-intel-2.7/Crypto/Hash/MD2.sold:警告:忽略文件构建/temp.macosx-10.6-intel-2.7/src/MD2. o,文件是为不支持的文件格式(0xcf 0xfa 0x0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 0x 0 0 0)构建的正在链接的架构(i386):build/temp.macosx-10.6-intel-2.7/src/MD2. o ld:文件未找到: /usr/lib/system/libdnsinfo.dylib的架构i386 Collect2:ld返回1退出状态ld:文件未找到: /usr/lib/system/<建筑x86_64

有办法解决这个问题吗?


共3个答案

匿名用户

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

对我有效的快速解决方案是将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

匿名用户

在eclipse中遇到同样的问题,以下内容对我很有用:

1)查找lib的位置

 locate libdnsinfo.dynlib

2)复制粘贴位置到

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

匿名用户

使用libdns_服务代替libdnsinfo。最新sdk不再支持动态库。