MacOS: xcode 在 big sur 上升級 12.5.1

 Mac OS 升級到 Big Sur 之後, 

 Xcode 打算升級到 12 以上, 但透過 App Store 會卡住.. 

來試試手動安裝

1. 改用 zsh

    $ chsh -s /bin/zsh

   重啟 terminal

2.  先移除原本的 xcode 

3. https://developer.apple.com/download/all/


% xattr -d com.apple.quarantine Xcode_12.5.1.xip
    刪除屬性

xattr 用法:

usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...]

       xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...]

       xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...]

       xattr -d [-r] [-s] attr_name file [file ...]

       xattr -c [-r] [-s] file [file ...]


The first form lists the names of all xattrs on the given file(s).

The second form (-p) prints the value of the xattr attr_name.

The third form (-w) sets the value of the xattr attr_name to the string attr_value.

The fourth form (-d) deletes the xattr attr_name.

The fifth form (-c) deletes (clears) all xattrs.


options:

  -h: print this help

  -l: print long format (attr_name: attr_value and hex output has offsets and

      ascii representation)

  -r: act recursively

  -s: act on the symbolic link itself rather than what the link points to

  -v: also print filename (automatic with -r and with multiple files)

  -x: attr_value is represented as a hex string for input and output


接著用 Finder 雙擊 此 xip 檔, 會產生 Xcode, 搬到 應用程式下即可


--



點擊 dmg  後點擊 pkg 安裝即可


--

% sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
or
% sudo xcode-select -s /Library/Developer/CommandLineTools

/Applications/Xcode.app/Contents/Developer 即 圖形化 xcode
/Library/Developer/CommandLineTools : 用這則是 xcode command line tools. 


留言

熱門文章