【问题标题】:lipo: can't figure out the architecture type of: /var/folders/lipo:无法确定 /var/folders/ 的架构类型
【发布时间】:2011-09-13 01:56:21
【问题描述】:

我尝试在 Mac OSX Snowleopard 上安装 lxml 并不断收到错误:

lipo: can't figure out the architecture type of: /var/folders/

我确实安装了支持 10.4 SDK 的 XCode,并将 gcc 4.2 更改为 4.0.1

有什么线索??? Python 2.6.1 和 Leopard 1.6.7..

running install
running bdist_egg
running egg_info
writing src/lxml.egg-info/PKG-INFO
writing top-level names to src/lxml.egg-info/top_level.txt
writing dependency_links to src/lxml.egg-info/dependency_links.txt
reading manifest file 'src/lxml.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'lxml.etree.c' under directory 'src/lxml'
warning: no files found matching 'lxml.objectify.c' under directory 'src/lxml'
warning: no files found matching 'lxml.etree.h' under directory 'src/lxml'
warning: no files found matching 'lxml.etree_api.h' under directory 'src/lxml'
warning: no files found matching '*.html' under directory 'doc'
writing manifest file 'src/lxml.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-universal/egg
running install_lib
running build_py
running build_ext
building 'lxml.etree' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -I/usr/include/libxml2 -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c src/lxml/lxml.etree.c -o build/temp.macosx-10.6-universal-2.6/src/lxml/lxml.etree.o -w -flat_namespace
i686-apple-darwin10-gcc-4.2.1: src/lxml/lxml.etree.c: No such file or directory
i686-apple-darwin10-gcc-4.2.1: no input files
powerpc-apple-darwin10-gcc-4.2.1: src/lxml/lxml.etree.c: No such file or directory
powerpc-apple-darwin10-gcc-4.2.1: no input files
i686-apple-darwin10-gcc-4.2.1: src/lxml/lxml.etree.c: No such file or directory
i686-apple-darwin10-gcc-4.2.1: no input files
lipo: can't figure out the architecture type of: /var/tmp//ccCwMxyq.out
error: command 'gcc-4.2' failed with exit status 1

【问题讨论】:

  • 我们看不到您的错误信息。如果您在说(I)“继续收到此错误消息”时是通用的,那么您需要发布错误消息。也可能有助于发布您/尝试安装到的路径。祝你好运。
  • @shelter 我相信 dev3928 将标题中的文本称为错误消息。
  • 请发布您运行的命令、整个错误消息,最好是整个构建输出。 /var/folders 是通往$TMPDIR 的路径的开头,所以你甚至还没有发布整行!另外,请说明您使用的 Python 版本和 OS X 版本。
  • 添加了错误行,似乎 gcc 仍在寻找 4.2 版本,而.. 我如何指出它使用 4.0.1 代替?我尝试使用符号链接..

标签: python macos unix lxml


【解决方案1】:

您的 python 存在架构问题,由于 Xcode 4 的更改(放弃对 10.4u SDK 和 gcc-4.0 的支持),在 10.7 Lion 上使用该 Python 构建 C 扩展模块是不切实际的。要么使用 Apple 提供的 Python 2.7

/usr/bin/python2.7

安装Python 2.7.3 Mac OS X 64-bit/32-bit x86-64/i386 Installer

【讨论】:

【解决方案2】:

我在尝试使用 Python 2.7 安装牛奶时遇到了同样的问题。我无法用 Ali Elouafiq 的确切答案解决我的问题,但我能够使用 Python 2.6 系统安装牛奶。

因此,也许尝试其他版本的 Python 直到它可以工作是一种经济有效的方法。

【讨论】:

    【解决方案3】:

    我发现通过 brew 安装 python 可以轻松避免此类编译问题。如果 brew 无法链接公式,只需使用以下命令强制它:

    brew link --overwrite python
    

    另请参阅:http://docs.python-guide.org/en/latest/starting/install/osx/

    【讨论】:

      猜你喜欢
      • 2013-11-24
      • 1970-01-01
      • 2020-11-22
      • 2021-06-11
      • 1970-01-01
      • 1970-01-01
      • 2015-09-06
      • 2014-01-10
      • 2014-02-01
      相关资源
      最近更新 更多