使用 macport 安装 hhvm 时出错,使用 macport 安装时失败

Error install hhvm with macport and fail all install with macport

我尝试在 Mac OS X Yosemite 上安装 HHVM,但失败了,最后我无法进行任何安装 MacPort.

例如,如果我尝试使用以下命令行安装 pear:

sudo port install php55-pear

结果:

--->  Computing dependencies for php55-pear
--->  Cleaning php55-pear
--->  Scanning binaries for linking errors
--->  Found 29 broken file(s), matching files to ports  
--->  Found 6 broken port(s), determining rebuild order
--->  Rebuilding in order
     boost @1.55.0 +no_single+no_static+python27
     libdlna @0.2.4 
     harfbuzz-icu @0.9.25 
     webkit-gtk3 @2.2.3 +video
     php54-intl @5.4.16 
     openldap @2.4.31 
--->  Computing dependencies for python27
--->  Staging python27 into destroot
Error: org.macports.destroot for port python27 returned: command execution failed
Please see the log file for port python27 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/main.log
Error: Unable to upgrade port: 1
Error rebuilding boost
    while executing
"error "Error rebuilding $portname""
    (procedure "revupgrade_scanandrebuild" line 395)
    invoked from within
"revupgrade_scanandrebuild broken_port_counts $opts"
    (procedure "macports::revupgrade" line 5)
    invoked from within
"macports::revupgrade $opts"
    (procedure "action_revupgrade" line 2)
    invoked from within
"action_revupgrade $action $portlist $opts"
    (procedure "action_target" line 96)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 103)
    invoked from within
"process_cmd $remaining_args"
    invoked from within
"if { [llength $remaining_args] > 0 } {

    # If there are remaining arguments, process those as a command
    set exit_status [process_cmd $remaining..."
    (file "/opt/local/bin/port" line 5268)

在日志文件中(/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/main.log):

version:1
:msg:main --->  Computing dependencies for python27:info:main .:debug:main python27 has no conflicts
:debug:main Searching for dependency: gettext
:debug:main Found Dependency: receipt exists for gettext
:debug:main Searching for dependency: zlib
:debug:main Found Dependency: receipt exists for zlib
:debug:main Searching for dependency: openssl
:debug:main Found Dependency: receipt exists for openssl
:debug:main Searching for dependency: sqlite3
:debug:main Found Dependency: receipt exists for sqlite3
:debug:main Searching for dependency: db48
:debug:main Found Dependency: receipt exists for db48
:debug:main Searching for dependency: ncurses
:debug:main Found Dependency: receipt exists for ncurses
:debug:main Searching for dependency: bzip2
:debug:main Found Dependency: receipt exists for bzip2
:debug:main Searching for dependency: libedit
:debug:main Found Dependency: receipt exists for libedit
:debug:main Searching for dependency: python_select
:debug:main Found Dependency: receipt exists for python_select
:debug:main Searching for dependency: python2_select
:debug:main Found Dependency: receipt exists for python2_select
:msg:main 
:debug:main Executing org.macports.main (python27)
:debug:main changing euid/egid - current euid: 0 - current egid: 0
:debug:main egid changed to: 501
:debug:main euid changed to: 502
:debug:main Skipping completed org.macports.archivefetch (python27)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.fetch (python27)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.checksum (python27)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.extract (python27)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.patch (python27)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:main Skipping completed org.macports.configure (python27)
:debug:main Privilege de-escalation not attempted as not running as root.
:debug:build build phase started at Mon Jun 15 09:32:15 CEST 2015
:notice:build --->  Building python27
:debug:build Executing org.macports.build (python27)
:debug:build Environment: 
CC_PRINT_OPTIONS='YES'
CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/.CC_PRINT_OPTIONS'
CPATH='/opt/local/include'
LIBRARY_PATH='/opt/local/lib'
MACOSX_DEPLOYMENT_TARGET='10.10'
:debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.10" && /usr/bin/make -j4 -w all MAKE="/usr/bin/make CC=/usr/bin/clang"'
:debug:build Executing command line:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.10" && /usr/bin/make -j4 -w all MAKE="/usr/bin/make CC=/usr/bin/clang" 
:info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.10'
:info:build /opt/local/bin/gcc-mp-4.8 -c -fno-strict-aliasing -fno-common -dynamic -pipe -Os -fwrapv -m64 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -I./Include -I/opt/local/include -I/opt/local/include/db48  -DPy_BUILD_CORE -o Python/mactoolboxglue.o Python/mactoolboxglue.c
:info:build In file included from /usr/include/dispatch/dispatch.h:51:0,
:info:build                  from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:15,
:info:build                  from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFPropertyList.h:13,
:info:build                  from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:55,
:info:build                  from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:19,
:info:build                  from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
:info:build                  from Include/pymactoolbox.h:10,
:info:build                  from Python/mactoolboxglue.c:27:
:info:build /usr/include/dispatch/object.h:143:15: error: expected identifier or '(' before '^' token
:info:build  typedef void (^dispatch_block_t)(void);
:info:build                ^
:info:build /usr/include/dispatch/object.h:362:3: error: unknown type name 'dispatch_block_t'
:info:build    dispatch_block_t notification_block);
:info:build    ^
:info:build make: *** [Python/mactoolboxglue.o] Error 1
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.10'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/work/Python-2.7.10" && /usr/bin/make -j4 -w all MAKE="/usr/bin/make CC=/usr/bin/clang" 
:info:build Exit code: 2
:error:build org.macports.build for port python27 returned: command execution failed
:debug:build Error code: CHILDSTATUS 44681 2
:debug:build Backtrace: command execution failed
    while executing
"system -nice 0 $fullcmdstring"
    ("eval" body line 1)
    invoked from within
"eval system $notty $nice $fullcmdstring"
    invoked from within
"command_exec build"
    (procedure "portbuild::build_main" line 8)
    invoked from within
"portbuild::build_main org.macports.build"
    ("eval" body line 1)
    invoked from within
"eval $procedure $targetname"
:info:build Warning: targets not executed for python27: org.macports.install org.macports.build org.macports.destroot
:notice:build Please see the log file for port python27 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python27/python27/main.log

不知道怎么解决。有人有想法吗?

阿尔诺

sudo port install php55-pear 不会安装 HHVM——它会安装标准的 PHP5 引擎,然后将 PEAR 存储库添加到它。此外,根据错误消息,我怀疑您遇到的问题根本不是 PHP,而是 Python 2.7 包的问题。您应该与 MacPorts 维护者一起解决这个问题——它肯定与 HHVM 无关,并且可能与 PHP 完全无关。

如果你想尝试在 Mac 上构建 HHVM,我一直在努力将其提升并再次 运行。 These directions on the wiki 在撰写本文时被认为适用于 HHVM 主机。您可以尝试一下,尽管没有保证它们会真正起作用,Mac 支持仍然是超级实验性的。 (在您解决上述 Mac 端口问题之前,它们可能 不会 工作!)

我的错误改了。

我遵循了post中的描述:https://trac.macports.org/ticket/40167

我成功启动了命令: sudo port clean all

之后: sudo port -d upgrade python27

但是,最后的结果: Exit code: 2 Error: org.macports.build for port valabind returned: command execution failed DEBUG: Error code: CHILDSTATUS 70008 2 DEBUG: Backtrace: command execution failed while executing "system -nice 0 $fullcmdstring" ("eval" body line 1) invoked from within "eval system $notty $nice $fullcmdstring" invoked from within "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "portbuild::build_main org.macports.build" ("eval" body line 1) invoked from within "eval $procedure $targetname" Warning: targets not executed for valabind: org.macports.destroot org.macports.build Please see the log file for port valabind for details: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valabind/valabind/main.log DEBUG: can not find channel named "debuglog" while executing "tcl::puts debuglog {DEBUG: Starting logging for valabind}" invoked from within "catch "tcl::puts $args"" Error: Unable to upgrade port: 1 DEBUG: Rebuilding port valabind finished with status 1 Error rebuilding valabind while executing "error "Error rebuilding $portname"" (procedure "revupgrade_scanandrebuild" line 395) invoked from within "revupgrade_scanandrebuild broken_port_counts $opts" (procedure "macports::revupgrade" line 5) invoked from within "macports::revupgrade $opts" (procedure "action_revupgrade" line 2) invoked from within "action_revupgrade $action $portlist $opts" (procedure "action_upgrade" line 25) invoked from within "$action_proc $action $portlist [array get global_options]" (procedure "process_cmd" line 103) invoked from within "process_cmd $remaining_args" invoked from within "if { [llength $remaining_args] > 0 } { # If there are remaining arguments, process those as a command set exit_status [process_cmd $remaining..." (file "/opt/local/bin/port" line 5268)

我现在尝试经典代码进行测试:sudo port install php55-pear

结果改变但总是失败:

--->  Computing dependencies for php55-pear
--->  Cleaning php55-pear
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  Found 19 broken file(s), matching files to ports   
--->  Found 7 broken port(s), determining rebuild order
--->  Rebuilding in order
     gcr @3.10.1 
     ushare @1.1a 
     valabind @0.8.0 
     wget @1.14 +ssl
     geocode-glib @3.10.0 
     strigi @0.7.8 
     nepomuk-core @4.12.5 
--->  Fetching archive for libusb
--->  Attempting to fetch libusb-1.0.19_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/libusb
--->  Attempting to fetch libusb-1.0.19_0.darwin_14.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libusb
--->  Installing libusb @1.0.19_0
--->  Cleaning libusb
--->  Deactivating libusb @1.0.18_0
--->  Cleaning libusb
--->  Activating libusb @1.0.19_0
--->  Cleaning libusb
--->  Fetching archive for libusb-compat
--->  Attempting to fetch libusb-compat-0.1.5_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/libusb-compat
--->  Attempting to fetch libusb-compat-0.1.5_0.darwin_14.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/libusb-compat
--->  Computing dependencies for libusb-compat
--->  Unable to uninstall libusb-compat @0.1.5_0, the following ports depend on it:
--->   gnupg @1.4.13_1
--->   gnupg @1.4.16_0
Warning: Uninstall forced.  Proceeding despite dependencies.
--->  Deactivating libusb-compat @0.1.5_0
--->  Unable to deactivate libusb-compat @0.1.5_0, the following ports depend on it:
--->   gnupg @1.4.16_0
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Cleaning libusb-compat
--->  Uninstalling libusb-compat @0.1.5_0
--->  Cleaning libusb-compat
--->  Computing dependencies for libusb-compat
--->  Installing libusb-compat @0.1.5_0
--->  Activating libusb-compat @0.1.5_0
--->  Cleaning libusb-compat
--->  Computing dependencies for gnupg
--->  Fetching archive for gnupg
--->  Attempting to fetch gnupg-1.4.19_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/gnupg
--->  Attempting to fetch gnupg-1.4.19_0.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/gnupg
--->  Attempting to fetch gnupg-1.4.19_0.darwin_14.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/gnupg
--->  Fetching distfiles for gnupg
--->  Attempting to fetch gnupg-1.4.19.tar.bz2 from http://lil.fr.distfiles.macports.org/gnupg
--->  Verifying checksums for gnupg                                                  
--->  Extracting gnupg
--->  Applying patches to gnupg
--->  Configuring gnupg
--->  Building gnupg
--->  Staging gnupg into destroot
--->  Installing gnupg @1.4.19_0
--->  Cleaning gnupg
--->  Computing dependencies for gnupg
--->  Deactivating gnupg @1.4.16_0
--->  Cleaning gnupg
--->  Activating gnupg @1.4.19_0
--->  Cleaning gnupg
--->  Computing dependencies for gcr
--->  Fetching archive for gcr
--->  Attempting to fetch gcr-3.16.0_0.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/gcr
--->  Attempting to fetch gcr-3.16.0_0.darwin_14.x86_64.tbz2.rmd160 from http://lil.fr.packages.macports.org/gcr
--->  Installing gcr @3.16.0_0
--->  Cleaning gcr
--->  Computing dependencies for gcr
--->  Deactivating gcr @3.10.1_1
--->  Cleaning gcr
--->  Activating gcr @3.16.0_0
--->  Cleaning gcr
--->  Computing dependencies for ushare
--->  Cleaning ushare
--->  Computing dependencies for valabind
--->  Building valabind
Error: org.macports.build for port valabind returned: command execution failed
Please see the log file for port valabind for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valabind/valabind/main.log
Error: Unable to upgrade port: 1
Error rebuilding valabind
    while executing
"error "Error rebuilding $portname""
    (procedure "revupgrade_scanandrebuild" line 395)
    invoked from within
"revupgrade_scanandrebuild broken_port_counts $opts"
    (procedure "macports::revupgrade" line 5)
    invoked from within
"macports::revupgrade $opts"
    (procedure "action_revupgrade" line 2)
    invoked from within
"action_revupgrade $action $portlist $opts"
    (procedure "action_target" line 96)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 103)
    invoked from within
"process_cmd $remaining_args"
    invoked from within
"if { [llength $remaining_args] > 0 } {

    # If there are remaining arguments, process those as a command
    set exit_status [process_cmd $remaining..."
    (file "/opt/local/bin/port" line 5268)

你的 pear 安装依赖于这个(损坏的)部分。

--->  Found 7 broken port(s), determining rebuild order
--->  Rebuilding in order
      gcr @3.10.1 
      ushare @1.1a 
      valabind @0.8.0 
      wget @1.14 +ssl
      geocode-glib @3.10.0 
      strigi @0.7.8 
      nepomuk-core @4.12.5 

根据您的错误结果,它停止更新 valabind。 如果你尝试会发生什么:

port selfupdate
sudo port install -d -R valabind

如果 valabind 是您的 php install 的依赖项并且具有自身的依赖项,则 port 无法处理此问题。是否根据 man port 页面进行安装或升级:

 -R       also upgrade dependents (only affects upgrade) - note that this
          does not upgrade dependents' dependencies

同时检查 valabind here 的主页。

调试的一个好主意是 port -y 选项。

 -y       Perform a dry run. All of the steps to build the ports and their
          dependencies are computed, but not actually performed. With the
          verbose flag, every step is reported; otherwise there is just
          one message per port, which allows you to easily determine the
          recursive deps of a port (and the order in which they will be
          built).

同样的错误。

1/ sudo port selfupdate,

结果:

--->  Updating MacPorts base sources using rsync
    MacPorts base version 2.3.3 installed,
    MacPorts base version 2.3.3 downloaded.
    --->  Updating the ports tree
    --->  MacPorts base is already the latest version

    The ports tree has been updated. To upgrade your installed ports, you should run
      port upgrade outdated

2/sudo port install -d -R valabind

结果:

--->  Computing dependencies for valabind
    --->  Cleaning valabind
    --->  Scanning binaries for linking errors
    --->  Found 15 broken file(s), matching files to ports   
    --->  Found 6 broken port(s), determining rebuild order
    --->  Rebuilding in order
         valabind @0.8.0 
         ushare @1.1a 
         wget @1.14 +ssl
         geocode-glib @3.10.0 
         strigi @0.7.8 
         nepomuk-core @4.12.5 
    --->  Fetching archive for valabind
    --->  Attempting to fetch valabind-0.8.0_1.darwin_14.x86_64.tbz2 from http://lil.fr.packages.macports.org/valabind
    --->  Attempting to fetch valabind-0.8.0_1.darwin_14.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/valabind
    --->  Attempting to fetch valabind-0.8.0_1.darwin_14.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/valabind
    --->  Computing dependencies for valabind
    --->  Fetching distfiles for valabind
    --->  Verifying checksums for valabind
    --->  Extracting valabind
    --->  Configuring valabind
    --->  Building valabind
    Error: org.macports.build for port valabind returned: command execution failed
    Please see the log file for port valabind for details:
        /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valabind/valabind/main.log
    Error: Unable to upgrade port: 1
    Error rebuilding valabind
        while executing
    "error "Error rebuilding $portname""
        (procedure "revupgrade_scanandrebuild" line 395)
        invoked from within
    "revupgrade_scanandrebuild broken_port_counts $opts"
        (procedure "macports::revupgrade" line 5)
        invoked from within
    "macports::revupgrade $opts"
        (procedure "action_revupgrade" line 2)
        invoked from within
    "action_revupgrade $action $portlist $opts"
        (procedure "action_target" line 96)
        invoked from within
    "$action_proc $action $portlist [array get global_options]"
        (procedure "process_cmd" line 103)
        invoked from within
    "process_cmd $remaining_args"
        invoked from within
    "if { [llength $remaining_args] > 0 } {

        # If there are remaining arguments, process those as a command
        set exit_status [process_cmd $remaining..."
        (file "/opt/local/bin/port" line 5268)

3/sudo port install -d -R -y valabind

结果:

--->  Computing dependencies for valabind
For valabind: skipping org.macports.main (dry run)
--->  Scanning binaries for linking errors
--->  Found 15 broken file(s), matching files to ports   
--->  Found 6 broken port(s), determining rebuild order
--->  Rebuilding in order
     valabind @0.8.0 
     ushare @1.1a 
     wget @1.14 +ssl
     geocode-glib @3.10.0 
     strigi @0.7.8 
     nepomuk-core @4.12.5 
--->  Computing dependencies for valabind
--->  Building valabind
Error: org.macports.build for port valabind returned: command execution failed
Please see the log file for port valabind for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_valabind/valabind/main.log
Error: Unable to upgrade port: 1
Error rebuilding valabind
    while executing
"error "Error rebuilding $portname""
    (procedure "revupgrade_scanandrebuild" line 395)
    invoked from within
"revupgrade_scanandrebuild broken_port_counts $opts"
    (procedure "macports::revupgrade" line 5)
    invoked from within
"macports::revupgrade $opts"
    (procedure "action_revupgrade" line 2)
    invoked from within
"action_revupgrade $action $portlist $opts"
    (procedure "action_target" line 96)
    invoked from within
"$action_proc $action $portlist [array get global_options]"
    (procedure "process_cmd" line 103)
    invoked from within
"process_cmd $remaining_args"
    invoked from within
"if { [llength $remaining_args] > 0 } {

    # If there are remaining arguments, process those as a command
    set exit_status [process_cmd $remaining..."
    (file "/opt/local/bin/port" line 5268)

我终于 解决了我的问题 有两个系列的动作:

  1. 用 brew

brew tap homebrew/dupes brew tap homebrew/versions brew tap mcuadros/homebrew-hhvm brew update cd $(brew --repository) git reset --hard FETCH_HEAD brew update brew install hhvm --HEAD brew install ocaml brew link dwarfutils ocaml brew unlink libdwarf brew link dwarfutils ocaml brew link --overwrite ocaml brew link dwarfutils ocaml brew install hhvm --HEAD

之后...

  1. 与 macports

    sudo port -v selfupdate port upgrade outdated sudo port upgrade outdated sudo port search ImageMagick sudo port install ImageMagick port selfupdate sudo port selfupdate

一个重要的细节,MacPorts 在本次更新中从 版本 2.3.3 升级到版本 2.3.4

MacPort 现已恢复运行。