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

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 青河县| 临澧县| 宁城县| 达孜县| 临武县| 高尔夫| 会泽县| 建宁县| 宁陵县| 台中县| 扶沟县| 贺兰县| 行唐县| 河西区| 固原市| 桓仁| 社旗县| 泰兴市| 西乌珠穆沁旗| 湖北省| 驻马店市| 长葛市| 黄冈市| 嘉荫县| 山西省| 通海县| 邹平县| 长武县| 德保县| 台安县| 治多县| 仪陇县| 长汀县| 天全县| 同心县| 昌黎县| 岢岚县| 恩平市| 镇康县| 巴塘县| 从江县|