JUST DO IT ~

          我只想當個程序員

          brew 安裝 cmake

          chmod -R 777 /usr/local/
          GMac:~ XXXX$ brew install cmake
          ==> Installing cmake dependency: xz
          ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/xz-5.2.0.yo
          ######################################################################## 100.0%
          ==> Pouring xz-5.2.0.yosemite.bottle.tar.gz
          Error: The `brew link` step did not complete successfully
          The formula built, but is not symlinked into /usr/local
          Could not symlink include/lzma
          /usr/local/include is not writable.

          You can try again using:
            brew link xz
          ==> Summary
          ??  /usr/local/Cellar/xz/5.2.0: 59 files, 1.7M
          ==> Installing cmake
          ==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/cmake-3.1.1
          ######################################################################## 100.0%
          ==> Pouring cmake-3.1.1_1.yosemite.bottle.tar.gz
          ??  /usr/local/Cellar/cmake/3.1.1_1: 1821 files, 30M
          GMac:~ XXXX$ cmake
          dyld: Library not loaded: /usr/local/lib/liblzma.5.dylib
            Referenced from: /usr/local/bin/cmake
            Reason: Incompatible library version: cmake requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0
          Trace/BPT trap: 5

          GMac:~ XXXX$
          GMac:~ XXXX$ brew install xz
          Warning: xz-5.2.0 already installed, it's just not linked
          GMac:~ XXXX$ brew link xz
          Linking /usr/local/Cellar/xz/5.2.0...
          Error: Could not symlink include/lzma
          /usr/local/include is not writable.
          GMac:~ XXXX$ sudo brew link xz
          Password:
          Error: Cowardly refusing to `sudo brew link`
          You can use brew with sudo, but only if the brew executable is owned by root.
          However, this is both not recommended and completely unsupported so do so at
          your own risk.
          GMac:~ XXXX$ su -
          Password:
          GMac:~ root# brew link xz
          Error: Cowardly refusing to `sudo brew link`
          You can use brew with sudo, but only if the brew executable is owned by root.
          However, this is both not recommended and completely unsupported so do so at
          your own risk.
          GMac:~ root# quit
          -sh: quit: command not found
          GMac:~ root# exit
          logout
          GMac:~ XXXX$ brew link xz
          Linking /usr/local/Cellar/xz/5.2.0...
          Error: Could not symlink include/lzma
          /usr/local/include is not writable.
          GMac:~ XXXX$ ls /usr/local/include/
          evdns.h        event2        evrpc.h
          event.h        evhttp.h    evutil.h
          GMac:~ XXXX$ ls /usr/local/include/ -all
          ls: -all: No such file or directory
          /usr/local/include/:
          evdns.h        event2        evrpc.h
          event.h        evhttp.h    evutil.h
          GMac:~ XXXX$ ls -all  /usr/local/include/
          total 40
          drwxr-xr-x   8 root  admin   272  2  7 10:13 .
          drwxrwxr-x  20 root  admin   680  2  7 10:13 ..
          -rw-r--r--@  1 root  admin  1974  2  7 10:13 evdns.h
          -rw-r--r--@  1 root  admin  2760  2  7 10:13 event.h
          drwxr-xr-x  27 root  admin   918  2  7 10:13 event2
          -rw-r--r--@  1 root  admin  1990  2  7 10:13 evhttp.h
          -rw-r--r--@  1 root  admin  1970  2  7 10:13 evrpc.h
          -rw-r--r--@  1 root  admin  1737  2  7 10:13 evutil.h
          GMac:~ XXXX$ brew link xz
          Linking /usr/local/Cellar/xz/5.2.0...
          Error: Could not symlink include/lzma
          /usr/local/include is not writable.
          GMac:~ XXXX$ cmake
          dyld: Library not loaded: /usr/local/lib/liblzma.5.dylib
            Referenced from: /usr/local/bin/cmake
            Reason: Incompatible library version: cmake requires version 8.0.0 or later, but liblzma.5.dylib provides version 6.0.0
          Trace/BPT trap: 5
          GMac:~ XXXX$ find /  -name libzma.5.dylib  2>/dev/null
          ^C
          GMac:~ XXXX$ find /usr  -name libzma.5.dylib  2>/dev/null
          GMac:~ XXXX$ find /usr  -name libzma.5.dylib 
          find: /usr/sbin/authserver: Permission denied
          GMac:~ XXXX$ sudo find /usr  -name libzma.5.dylib 
          Password:
          GMac:~ XXXX$ sudo find /usr  -name libzma.5.dylib 
          GMac:~ XXXX$  find /usr  -name libzma.5.dylib 
          find: /usr/sbin/authserver: Permission denied
          GMac:~ XXXX$
          GMac:~ XXXX$
          GMac:~ XXXX$ sudo find /usr  -name libzma.5.dylib 
          GMac:~ XXXX$ sudo find /  -name libzma.5.dylib 
          find: /dev/fd/3: Not a directory
          find: /dev/fd/4: Not a directory
          liblzma^CGMac:~ XXXX$ sudo find /  -name "libzma.5.dylib" 
          find: /dev/fd/3: Not a directory
          find: /dev/fd/4: Not a directory






          The error indicates you’re missing the dependency on liblzma, which in Homebrew is contained in the xz formula. Try this:

          brew install xz
          shareimprove this answer
          answered May 16 '14 at 20:20

          Buck Doyle
          4,2651922
                    
          I needed to remove the older version rm -rf /usr/local/Cellar/xz/5.0.3 and brew link --force xz for Version 5.2.0 –  daniel Feb 19 at 23:22






          posted on 2015-03-22 11:36 小高 閱讀(5428) 評論(0)  編輯  收藏 所屬分類: Mac OSX

          導航

          <2015年3月>
          22232425262728
          1234567
          891011121314
          15161718192021
          22232425262728
          2930311234

          統計

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關注的blog

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 曲麻莱县| 城固县| 汝州市| 罗山县| 澜沧| 松原市| 左贡县| 会东县| 嘉定区| 桂东县| 克山县| 佳木斯市| 江川县| 天镇县| 岳池县| 台中县| 东至县| 东安县| 平潭县| 灵丘县| 固原市| 富平县| 广宁县| 黑山县| 北宁市| 兴仁县| 盐亭县| 射洪县| 广宗县| 桃园市| 蒙阴县| 鄂尔多斯市| 上高县| 乃东县| 新晃| 宜州市| 运城市| 天柱县| 陇西县| 长泰县| 禹州市|