有人通过 Macports 在 Snow Leopard 中安装 python26 吗?

发布于 2024-08-03 13:00:04 字数 1991 浏览 4 评论 0原文

我在 Snow Leopard (MacPort v.1.8.0) 中运行后遇到构建错误,

sudo port install python26 

请问有什么解决方法吗?

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.2" && /usr/bin/make all MAKE="/usr/bin/make CC=/usr/bin/gcc-4.2" " returned error 2
Command output: if test ""; then \
        /usr/bin/gcc-4.2 -o Python.framework/Versions/2.6/Python  -dynamiclib \
            -isysroot "" \
            -all_load libpython2.6.a -Wl,-single_module \
            -install_name /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python \
            -compatibility_version 2.6 \
            -current_version 2.6; \
        else \
        /usr/bin/libtool -o Python.framework/Versions/2.6/Python -dynamic  libpython2.6.a \
             -lSystem -lSystemStubs -arch_only i386 -install_name /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python -compatibility_version 2.6 -current_version 2.6 ;\
    fi
/usr/bin/install -c -d -m 755  \
        Python.framework/Versions/2.6/Resources/English.lproj
/usr/bin/install -c -m 644 Mac/Resources/framework/Info.plist \
        Python.framework/Versions/2.6/Resources/Info.plist
ln -fsn 2.6 Python.framework/Versions/Current
ln -fsn Versions/Current/Python Python.framework/Python
ln -fsn Versions/Current/Headers Python.framework/Headers
ln -fsn Versions/Current/Resources Python.framework/Resources
/usr/bin/gcc-4.2 -L/opt/local/lib -u _PyMac_Error Python.framework/Versions/2.6/Python -o python.exe \
            Modules/python.o \
             -ldl      
ld: warning: in Python.framework/Versions/2.6/Python, file is not of required architecture
Undefined symbols:
  "_PyMac_Error", referenced from:
  "_Py_Main", referenced from:
      _main in python.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1

I got build error after run in Snow Leopard (MacPort v.1.8.0)

sudo port install python26 

any workaround please?

Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_python26/work/Python-2.6.2" && /usr/bin/make all MAKE="/usr/bin/make CC=/usr/bin/gcc-4.2" " returned error 2
Command output: if test ""; then \
        /usr/bin/gcc-4.2 -o Python.framework/Versions/2.6/Python  -dynamiclib \
            -isysroot "" \
            -all_load libpython2.6.a -Wl,-single_module \
            -install_name /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python \
            -compatibility_version 2.6 \
            -current_version 2.6; \
        else \
        /usr/bin/libtool -o Python.framework/Versions/2.6/Python -dynamic  libpython2.6.a \
             -lSystem -lSystemStubs -arch_only i386 -install_name /opt/local/Library/Frameworks/Python.framework/Versions/2.6/Python -compatibility_version 2.6 -current_version 2.6 ;\
    fi
/usr/bin/install -c -d -m 755  \
        Python.framework/Versions/2.6/Resources/English.lproj
/usr/bin/install -c -m 644 Mac/Resources/framework/Info.plist \
        Python.framework/Versions/2.6/Resources/Info.plist
ln -fsn 2.6 Python.framework/Versions/Current
ln -fsn Versions/Current/Python Python.framework/Python
ln -fsn Versions/Current/Headers Python.framework/Headers
ln -fsn Versions/Current/Resources Python.framework/Resources
/usr/bin/gcc-4.2 -L/opt/local/lib -u _PyMac_Error Python.framework/Versions/2.6/Python -o python.exe \
            Modules/python.o \
             -ldl      
ld: warning: in Python.framework/Versions/2.6/Python, file is not of required architecture
Undefined symbols:
  "_PyMac_Error", referenced from:
  "_Py_Main", referenced from:
      _main in python.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [python.exe] Error 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

北陌 2024-08-10 13:00:04

在 Snow Leopard 上通过 Macports 使用 Python 显然存在问题,请参阅此线程。从那里,这里的条目建议一种方法让它发挥作用。

There are apparently problems with Python via Macports on Snow Leopard, see this thread. From there, here's an entry suggesting a way to get it working.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文