用MacPorts构建openCV时出错



我正在尝试用MacPorts构建openCV。我遵循了这个程序。谁能帮我?谢谢。

输出:

--->  Computing dependencies for opencv..........................................................................
--->  Dependencies to be installed: bzip2 cmake libidn gettext expat libiconv gperf ncurses ncursesw openssl zlib dirac cppunit autoconf help2man p5.12-locale-gettext perl5.12 m4 perl5 perl5 perl5 automake libtool faac faad2 ffmpeg XviD gmake lame libogg libsdl xorg-libXext pkgconfig glib2 xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb python27 db46 gdbm python_select readline sqlite3 python27 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXrandr xorg-randrproto xrender xorg-renderproto libtheora libvorbis libvpx yasm schroedinger orc speex texi2html x264 liboil
--->  Installing bzip2 @1.0.6_0
**Error: Target org.macports.install returned: /usr/bin/tar: invalid option -- q
Try `/usr/bin/tar --help' for more information.**
Warning: the following items did not execute (for bzip2): org.macports.activate org.macports.install
**Error: Failed to install bzip2**
Log for bzip2 is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_bzip2/bzip2/main.log
Error: The following dependencies were not installed: bzip2 cmake libidn gettext expat libiconv gperf ncurses ncursesw openssl zlib dirac cppunit autoconf help2man p5.12-locale-gettext perl5.12 m4 perl5 perl5 perl5 automake libtool faac faad2 ffmpeg XviD gmake lame libogg libsdl xorg-libXext pkgconfig glib2 xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb python27 db46 gdbm python_select readline sqlite3 python27 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-libXrandr xorg-randrproto xrender xorg-renderproto libtheora libvorbis libvpx yasm schroedinger orc speex texi2html x264 liboil
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

您的/usr/bin/tar程序有问题。它要么是旧的(来自比你运行的更早的OS X版本),要么是你用GNU tar替换了它(它应该是BSD tar)。查看现有的MacPorts门票:

https://trac.macports.org/ticket/30969

https://trac.macports.org/ticket/31773

无论哪种方式,从备份中恢复/usr/bin/tar,或者如果没有备份,或者备份中包含错误的tar,请重新安装操作系统。

最新更新