python - 使用 MacPorts 1.8 在 Mac OS X 10.6 上安装 py25-gtk 期间构建失败

标签 python macos gtk macports getopt

当我执行此命令时:

sudo port clean py25-gtk
sudo port install py25-gtk

我收到此错误:

--->  Computing dependencies for py25-gtk
--->  Building getopt
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_sysutils_getopt/work/getopt-1.1.4" && /usr/bin/make -j2 all LIBCGETOPT=0 prefix=/opt/local mandir=/opt/local/share/man CC=/usr/bin/gcc-4.2 " returned error 2
Command output:       _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _print_help in getopt.o
      _parse_error in getopt.o
      _our_realloc in getopt.o
      _our_malloc in getopt.o
      _set_shell in getopt.o
      _set_shell in getopt.o
      _add_longopt in getopt.o
      _add_long_options in getopt.o
      _add_long_options in getopt.o
      _normalize in getopt.o
      _main in getopt.o
      _main in getopt.o
      _main in getopt.o
      _main in getopt.o
      _main in getopt.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make: *** [getopt] Error 1

Error: The following dependencies failed to build: atk gtk-doc gnome-doc-utils rarian getopt intltool gnome-common p5-pathtools p5-scalar-list-utils gtk2 cairo libpixman pango shared-mime-info xorg-libXcursor xorg-libXrandr libglade2 py25-cairo py25-numpy fftw-3 py25-nose py25-gobject
Error: Status 1 encountered during processing.

有关信息,getopt 未随 macports 一起安装,它位于/usr/bin/getopt

最佳答案

解决方案是重新安装所有端口,因为我升级到了新的操作系统版本(10.5 -> 10.6)。

要重新安装 ports,请保存已安装 ports 的列表:

port installed > myports.txt

清理所有部分完成的构建,并卸载所有已安装的端口:

sudo port clean installed
sudo port -f uninstall installed

浏览 myports.txt 并一一安装您实际想要使用的端口(而不是仅作为依赖项需要的端口),记住指定适当的变体:

sudo port install portname +variant1 +variant2 ...

为了解决我的问题,我可以这样做:

sudo port install py25-gtk

现在开始工作了!

阅读完整文档以重新安装端口 http://trac.macports.org/wiki/Migration

关于python - 使用 MacPorts 1.8 在 Mac OS X 10.6 上安装 py25-gtk 期间构建失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1478263/

相关文章:

c - gtkwidgets 的多维数组

python - 如何使用python关闭程序?

macos - 如何制作 Aquamacs 彩色主题棒?

linux - 如何列出存储库中的文件/目录?

c - 在 macOS 上找不到 Homebrew 的 LLVM "fatal error: ' stdio.h' 文件

c - 是什么导致了这个 C 内存泄漏? (退出并出现错误 137)

Python:按唯一值分隔列表

python - 谷歌应用引擎 webapp2 : No module named pkg_resources error when importing bigquery

python - 在雪豹上安装mysqldb

c++ - 关闭 GTK 窗口