V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Totoria
V2EX  ›  macOS

升级到 10.11 以后 Brew 装不了东西了。。

  •  
  •   Totoria · 2015-08-16 21:33:48 +08:00 · 11697 次点击
    这是一个创建于 3379 天前的主题,其中的信息可能已经有所发展或是发生改变。
    搜了半天没有结果 无奈之下只好来此伸手了。。不是程序员所以。。
    主要是为了用MTR和Aria2

    ==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
    Already downloaded: /Library/Caches/Homebrew/pkg-config-0.28.tar.gz
    ==> ./configure --prefix=/usr/local/Cellar/pkg-config/0.28 --disable-host-tool --with-internal-glib --with-pc-path=/usr/local/lib/pkgconfig:/usr/local/s
    checking for suffix of executables...
    checking whether we are cross compiling... configure: error: in `/private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details

    READ THIS: https://git.io/brew-troubleshooting

    这是log。。

    This file contains any messages produced by compilers while
    running configure, to aid debugging if configure makes a mistake.

    It was created by pkg-config configure 0.28, which was
    generated by GNU Autoconf 2.69. Invocation command line was

    $ ./configure --disable-debug --prefix=/usr/local/Cellar/pkg-config/0.28 --disable-host-tool --with-internal-glib --with-pc-path=/usr/local/lib/pkgconfig:/usr/local/share/pkgconfig:/usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.11

    ## --------- ##
    ## Platform. ##
    ## --------- ##

    hostname = Totorias-MacBook-Pro.local
    uname -m = x86_64
    uname -r = 15.0.0
    uname -s = Darwin
    uname -v = Darwin Kernel Version 15.0.0: Sun Jul 26 19:48:55 PDT 2015; root:xnu-3247.1.78~15/RELEASE_X86_64

    /usr/bin/uname -p = i386
    /bin/uname -X = unknown

    /bin/arch = unknown
    /usr/bin/arch -k = unknown
    /usr/convex/getsysinfo = unknown
    /usr/bin/hostinfo = Mach kernel version:
    Darwin Kernel Version 15.0.0: Sun Jul 26 19:48:55 PDT 2015; root:xnu-3247.1.78~15/RELEASE_X86_64
    Kernel configured for up to 8 processors.
    4 processors are physically available.
    8 processors are logically available.
    Processor type: x86_64h (Intel x86-64h Haswell)
    Processors active: 0 1 2 3 4 5 6 7
    Primary memory available: 16.00 gigabytes
    Default processor set: 313 tasks, 1652 threads, 8 processors
    Load average: 2.42, Mach factor: 5.56
    /bin/machine = unknown
    /usr/bin/oslevel = unknown
    /bin/universe = unknown

    PATH: /usr/local/Library/ENV/4.3
    PATH: /usr/bin
    PATH: /bin
    PATH: /usr/sbin
    PATH: /sbin


    ## ----------- ##
    ## Core tests. ##
    ## ----------- ##

    configure:2311: checking for a BSD-compatible install
    configure:2379: result: /usr/bin/install -c
    configure:2390: checking whether build environment is sane
    configure:2445: result: yes
    configure:2596: checking for a thread-safe mkdir -p
    configure:2635: result: ./install-sh -c -d
    configure:2642: checking for gawk
    configure:2672: result: no
    configure:2642: checking for mawk
    configure:2672: result: no
    configure:2642: checking for nawk
    configure:2672: result: no
    configure:2642: checking for awk
    configure:2658: found /usr/bin/awk
    configure:2669: result: awk
    configure:2680: checking whether make sets $(MAKE)
    configure:2702: result: yes
    configure:2818: checking build system type
    configure:2832: result: x86_64-apple-darwin15.0.0
    configure:2852: checking host system type
    configure:2865: result: x86_64-apple-darwin15.0.0
    configure:2906: checking how to print strings
    configure:2933: result: printf
    configure:2966: checking for style of include used by make
    configure:2994: result: GNU
    configure:3065: checking for gcc
    configure:3092: result: clang
    configure:3321: checking for C compiler version
    configure:3330: clang --version >&5
    Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
    Target: x86_64-apple-darwin15.0.0
    Thread model: posix
    configure:3341: $? = 0
    configure:3330: clang -v >&5
    Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
    Target: x86_64-apple-darwin15.0.0
    Thread model: posix
    configure:3341: $? = 0
    configure:3330: clang -V >&5
    clang: error: unsupported option '-V -isysroot'
    configure:3341: $? = 1
    configure:3330: clang -qversion >&5
    clang: error: unknown argument: '-qversion'
    clang: warning: no such sysroot directory: ''
    configure:3341: $? = 1
    configure:3361: checking whether the C compiler works
    configure:3383: clang conftest.c >&5
    clang: warning: no such sysroot directory: ''
    configure:3387: $? = 0
    configure:3435: result: yes
    configure:3438: checking for C compiler default output file name
    configure:3440: result: a.out
    configure:3446: checking for suffix of executables
    configure:3453: clang -o conftest conftest.c >&5
    clang: warning: no such sysroot directory: ''
    configure:3457: $? = 0
    configure:3479: result:
    configure:3501: checking whether we are cross compiling
    configure:3509: clang -o conftest conftest.c >&5
    clang: warning: no such sysroot directory: ''
    conftest.c:11:10: fatal error: 'stdio.h' file not found
    #include <stdio.h>
    ^
    1 error generated.
    configure:3513: $? = 1
    configure:3520: ./conftest
    ./configure: line 3522: ./conftest: No such file or directory
    configure:3524: $? = 127
    configure:3531: error: in `/private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28':
    configure:3533: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details

    ## ---------------- ##
    ## Cache variables. ##
    ## ---------------- ##

    ac_cv_build=x86_64-apple-darwin15.0.0
    ac_cv_env_CC_set=set
    ac_cv_env_CC_value=clang
    ac_cv_env_CFLAGS_set=
    ac_cv_env_CFLAGS_value=
    ac_cv_env_CPPFLAGS_set=
    ac_cv_env_CPPFLAGS_value=
    ac_cv_env_CPP_set=
    ac_cv_env_CPP_value=
    ac_cv_env_GLIB_CFLAGS_set=
    ac_cv_env_GLIB_CFLAGS_value=
    ac_cv_env_GLIB_LIBS_set=
    ac_cv_env_GLIB_LIBS_value=
    ac_cv_env_LDFLAGS_set=
    ac_cv_env_LDFLAGS_value=
    ac_cv_env_LIBS_set=
    ac_cv_env_LIBS_value=
    ac_cv_env_PKG_CONFIG_LIBDIR_set=set
    ac_cv_env_PKG_CONFIG_LIBDIR_value=/usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.11
    ac_cv_env_PKG_CONFIG_PATH_set=
    ac_cv_env_PKG_CONFIG_PATH_value=
    ac_cv_env_PKG_CONFIG_set=
    ac_cv_env_PKG_CONFIG_value=
    ac_cv_env_TESTS_SHELL_set=
    ac_cv_env_TESTS_SHELL_value=
    ac_cv_env_build_alias_set=
    ac_cv_env_build_alias_value=
    ac_cv_env_host_alias_set=
    ac_cv_env_host_alias_value=
    ac_cv_env_target_alias_set=
    ac_cv_env_target_alias_value=
    ac_cv_host=x86_64-apple-darwin15.0.0
    ac_cv_path_install='/usr/bin/install -c'
    ac_cv_prog_AWK=awk
    ac_cv_prog_ac_ct_CC=clang
    ac_cv_prog_make_make_set=yes

    ## ----------------- ##
    ## Output variables. ##
    ## ----------------- ##

    ACLOCAL='${SHELL} /private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28/missing --run aclocal-1.12'
    AMDEPBACKSLASH='\'
    AMDEP_FALSE='#'
    AMDEP_TRUE=''
    AMTAR='$${TAR-tar}'
    AM_BACKSLASH=''
    AM_DEFAULT_V=''
    AM_DEFAULT_VERBOSITY=''
    AM_V=''
    AR=''
    AUTOCONF='${SHELL} /private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28/missing --run autoconf'
    AUTOHEADER='${SHELL} /private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28/missing --run autoheader'
    AUTOMAKE='${SHELL} /private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28/missing --run automake-1.12'
    AWK='awk'
    CC='clang'
    CCDEPMODE=''
    CFLAGS=''
    CPP=''
    CPPFLAGS=''
    CYGPATH_W='echo'
    DEFS=''
    DEPDIR='.deps'
    DLLTOOL=''
    DSYMUTIL=''
    DUMPBIN=''
    ECHO_C='\c'
    ECHO_N=''
    ECHO_T=''
    EGREP=''
    EXEEXT=''
    FGREP=''
    GCOV=''
    GCOV_CFLAGS=''
    GLIB_CFLAGS=''
    GLIB_LIBS=''
    GREP=''
    HOST_TOOL_FALSE=''
    HOST_TOOL_TRUE=''
    INSTALL_DATA='${INSTALL} -m 644'
    INSTALL_PROGRAM='${INSTALL}'
    INSTALL_SCRIPT='${INSTALL}'
    INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
    INTERNAL_GLIB_FALSE=''
    INTERNAL_GLIB_TRUE=''
    LD=''
    LDFLAGS=''
    LIBOBJS=''
    LIBS=''
    LIBTOOL=''
    LIPO=''
    LN=''
    LN_S=''
    LTLIBOBJS=''
    MAKEINFO='${SHELL} /private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28/missing --run makeinfo'
    MANIFEST_TOOL=''
    MKDIR_P='./install-sh -c -d'
    NATIVE_WIN32_FALSE=''
    NATIVE_WIN32_TRUE=''
    NM=''
    NMEDIT=''
    OBJDUMP=''
    OBJEXT=''
    OTOOL64=''
    OTOOL=''
    PACKAGE='pkg-config'
    PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=pkg-config'
    PACKAGE_NAME='pkg-config'
    PACKAGE_STRING='pkg-config 0.28'
    PACKAGE_TARNAME='pkg-config'
    PACKAGE_URL=''
    PACKAGE_VERSION='0.28'
    PATH_SEPARATOR=':'
    PKG_CONFIG=''
    PKG_CONFIG_LIBDIR='/usr/lib/pkgconfig:/usr/local/Library/ENV/pkgconfig/10.11'
    PKG_CONFIG_PATH=''
    RANLIB=''
    SED=''
    SET_MAKE=''
    SHELL='/bin/sh'
    STRIP=''
    TESTS_SHELL=''
    VERSION='0.28'
    WARN_CFLAGS=''
    ac_ct_AR=''
    ac_ct_CC='clang'
    ac_ct_DUMPBIN=''
    am__EXEEXT_FALSE=''
    am__EXEEXT_TRUE=''
    am__fastdepCC_FALSE=''
    am__fastdepCC_TRUE=''
    am__include='include'
    am__isrc=''
    am__leading_dot='.'
    am__nodep='_no'
    am__quote=''
    am__tar='$${TAR-tar} chof - "$$tardir"'
    am__untar='$${TAR-tar} xf -'
    bindir='${exec_prefix}/bin'
    build='x86_64-apple-darwin15.0.0'
    build_alias=''
    build_cpu='x86_64'
    build_os='darwin15.0.0'
    build_vendor='apple'
    datadir='${datarootdir}'
    datarootdir='${prefix}/share'
    docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
    dvidir='${docdir}'
    exec_prefix='NONE'
    host='x86_64-apple-darwin15.0.0'
    host_alias=''
    host_cpu='x86_64'
    host_os='darwin15.0.0'
    host_vendor='apple'
    htmldir='${docdir}'
    includedir='${prefix}/include'
    infodir='${datarootdir}/info'
    install_sh='${SHELL} /private/tmp/pkg-config20150816-9473-nccjm8/pkg-config-0.28/install-sh'
    libdir='${exec_prefix}/lib'
    libexecdir='${exec_prefix}/libexec'
    localedir='${datarootdir}/locale'
    localstatedir='${prefix}/var'
    mandir='${datarootdir}/man'
    mkdir_p='$(MKDIR_P)'
    oldincludedir='/usr/include'
    pc_path=''
    pdfdir='${docdir}'
    prefix='/usr/local/Cellar/pkg-config/0.28'
    program_transform_name='s,x,x,'
    psdir='${docdir}'
    sbindir='${exec_prefix}/sbin'
    sharedstatedir='${prefix}/com'
    subdirs=''
    sysconfdir='${prefix}/etc'
    system_include_path=''
    system_library_path=''
    target_alias=''
    use_indirect_deps=''

    ## ----------- ##
    ## confdefs.h. ##
    ## ----------- ##

    /* confdefs.h */
    #define PACKAGE_NAME "pkg-config"
    #define PACKAGE_TARNAME "pkg-config"
    #define PACKAGE_VERSION "0.28"
    #define PACKAGE_STRING "pkg-config 0.28"
    #define PACKAGE_BUGREPORT "https://bugs.freedesktop.org/enter_bug.cgi?product=pkg-config"
    #define PACKAGE_URL ""
    #define PACKAGE "pkg-config"
    #define VERSION "0.28"

    configure: exit 1
    22 条回复    2015-08-18 09:50:11 +08:00
    kqz901002
        1
    kqz901002  
       2015-08-16 21:46:58 +08:00
    homebrew目前不支持10.11 等正式版
    Totoria
        2
    Totoria  
    OP
       2015-08-16 21:54:11 +08:00
    简单粗暴的暂时先手动复制cellar目录过去然后link一下 发现基本都还能用
    kqz901002
        3
    kqz901002  
       2015-08-16 22:02:35 +08:00
    @Totoria 这个是可以的,我装了10.10和10.11双系统,就是直接link /usr/local的
    kfll
        4
    kfll  
       2015-08-16 22:11:04 +08:00
    检查一下有没有 /usr/include,或者 brew config 看一下有没有 clt

    你可能需要安装 clt: xcode-select --install
    zander
        5
    zander  
       2015-08-16 22:15:06 +08:00
    homebrew我用着没问题。
    应该是权限出错了,看下/usr/local的权限,刚升10.11的时候我的homebrew也报错了,把/usr/local的权限修复了就好了。
    Totoria
        6
    Totoria  
    OP
       2015-08-16 22:21:03 +08:00
    @zander
    chown -R `whoami` /usr/local

    试了一下 没用


    @kfll 老虎prpr
    确实没有clt 显示n/a 现在在尝试安装
    typcn
        7
    typcn  
       2015-08-16 22:23:36 +08:00
    usr local 要把所有者切换到当前用户,且owner要有7权限
    XiaoxiaoPu
        8
    XiaoxiaoPu  
       2015-08-16 23:53:41 +08:00
    我觉得 homebrew 默认安装到 /usr/local 是一个很蛋疼的事情,反正我是把 homebrew 装到用户目录,什么问题都没出过
    pH
        9
    pH  
       2015-08-17 00:10:17 +08:00
    或者可以关闭一个系统功能
    wwwjfy
        10
    wwwjfy  
       2015-08-17 00:13:15 +08:00   ❤️ 1
    楼上都不看错误日志吗...

    错误是缺头文件,下载 xcode 7 beta,然后
    sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/
    Strikeactor
        11
    Strikeactor  
       2015-08-17 01:42:13 +08:00
    不是程序员为啥要装预览版。。
    Totoria
        12
    Totoria  
    OP
       2015-08-17 04:03:27 +08:00
    @Strikeactor 这个是Public Beta

    安装原因主要是因为被Yosemite卡的要怀孕了
    sinbh
        13
    sinbh  
       2015-08-17 04:52:27 +08:00 via Smartisan T1
    下一代系统启用Rootless安全机制,有些目录所有用户都没权限,导致一些东西的无法安装,可以在重启时恢复模式取消security integrity protect,我试了,不过然并卵
    vivianalive
        14
    vivianalive  
       2015-08-17 05:03:21 +08:00 via iPad
    折腾、发帖的时间不如降回 10.10 吧。
    20015jjw
        15
    20015jjw  
       2015-08-17 05:47:58 +08:00 via Android
    Brew doctor
    donotgo
        16
    donotgo  
       2015-08-17 06:55:58 +08:00
    @sinbh rootless 不影响 homebrew 装的 /usr/local
    peterzky
        17
    peterzky  
       2015-08-17 08:34:23 +08:00
    下载Xcode beta
    `xcode-select --switch /Applications/Xcode-beta.app`
    sinbh
        18
    sinbh  
       2015-08-17 08:56:25 +08:00
    @donotgo pip是不是影响了,有解决办法吗
    lonelygo
        19
    lonelygo  
       2015-08-17 09:53:22 +08:00   ❤️ 1
    @Totoria 我上周 brew install 的时候发现报错, brew update 报错, brew upgrade 下载了更新包,但是不安装,折腾来折腾去,算事弄好了。
    1 、 Xcode 升级到 7 beta ,但是 7 beta 和 6 可以共存,你要考虑是做共存还是直接删了 6 就用 7 beta ;
    2 、不知道是我人品不好,还是 7 beta 就这样, Preferences - Locations - Command Line Tools :选项是空的,下拉选择 Xcode 7.0
    3 、 brew doctor
    根据提示,一条一条的处理报错(我可能是曾经傻逼的用了 su ,报了了没有写全县,所以只能 chown -R 先修改权限;
    4 、 brew doctor 没有报错,仅仅是提示 10.11 是预览版,有可能不兼容后, brew update && brew upgrade
    5 、 brew install 正常
    预祝好运
    chenggiant
        20
    chenggiant  
       2015-08-18 00:08:01 +08:00
    要装 Xcode 7.0 吧
    skl
        21
    skl  
       2015-08-18 00:34:54 +08:00
    万年 10.9 飘过
    kevinmorgan
        22
    kevinmorgan  
       2015-08-18 09:50:11 +08:00
    brew doctor & Xcode 7.0
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2656 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 05:00 · PVG 13:00 · LAX 21:00 · JFK 00:00
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.