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 小高 閱讀(5415) 評論(0)  編輯  收藏 所屬分類: Mac OSX

          導航

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

          統計

          常用鏈接

          留言簿(3)

          隨筆分類(352)

          收藏夾(19)

          關注的blog

          手冊

          搜索

          積分與排名

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 浙江省| 盐亭县| 志丹县| 保康县| 海伦市| 游戏| 新蔡县| 东光县| 玛沁县| 文昌市| 太湖县| 东兴市| 溧阳市| 安岳县| 界首市| 綦江县| 上栗县| 鱼台县| 玉门市| 双江| 吕梁市| 仙游县| 太湖县| 锦州市| 承德县| 平陆县| 广宗县| 汉阴县| 梅州市| 建湖县| 陕西省| 玉溪市| 哈尔滨市| 灵宝市| 交城县| 响水县| 襄城县| 南岸区| 永昌县| 伊宁县| 沧州市|