UJP - 技術情報2 バックアップ : HomeBrew/install/MacOSX10.14.4Mojave の変更点

Life is fun and easy!

不正IP報告数

Okan Sensor
 
メイン
ログイン
ブログ カテゴリ一覧

1: 2019-06-06 (木) 12:10:00 nobuaki ソース バックアップ No.1 を復元して編集 現: 2019-06-06 (木) 12:14:23 nobuaki ソース 編集
Line 1: Line 1:
-*HomeBrewを [#y6651cc7+*HomeBrewをMacOS X 10.14.4 Mojavaにインストール [#d7a687fd
- +  
-**はじめに [#s5afc8ca] +**はじめに [#p50ac5bb]
- +
-**バージョンの確認. [#wbc08c2e]+
 + Yosemite以降,High Sierraまでは同じ手順でインストールができていたが,Mojaveになってから?対応するXcodeがバージョンアップしてから?Xcodeのインストールパスが変更されたようで新規インストールの場合エラーがでて進まない問題がある.
 + この記事では,そのエラーも体験しながら,エラーを解決してインストールを進める.
 + 
 +**バージョンの確認. [#b488f4b7]
 + 
 これからインストールを行う対象のマシンのOSバージョンを確認.  これからインストールを行う対象のマシンのOSバージョンを確認.
 + 
 MBA2013:Users ujpadmin$ sw_vers🆑  MBA2013:Users ujpadmin$ sw_vers🆑
 ProductName: Mac OS X  ProductName: Mac OS X
Line 12: Line 15:
 BuildVersion: 18E227  BuildVersion: 18E227
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 macos 10.14なので,通称mojaveというもの.  macos 10.14なので,通称mojaveというもの.
 + 
 Xcodeは,あらかじめApp Storeからインストール済み.  Xcodeは,あらかじめApp Storeからインストール済み.
 + 
 MBA2013:Users ujpadmin$ xcodebuild -version🆑  MBA2013:Users ujpadmin$ xcodebuild -version🆑
 Xcode 10.2.1  Xcode 10.2.1
 Build version 10E1001  Build version 10E1001
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 現時点(2019/06/06)で最新版.  現時点(2019/06/06)で最新版.
- +  
-**HomeBrewをインストールする(失敗する) [#h0372c92+**HomeBrewをインストールする(失敗する) [#id867833
 + 
 いつものように公式サイトに記載されている通りに,rubyをインストール.  いつものように公式サイトに記載されている通りに,rubyをインストール.
 + 
 MBA2013:Users ujpadmin$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"🆑  MBA2013:Users ujpadmin$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"🆑
 ==> This script will install:  ==> This script will install:
Line 37: Line 40:
 /usr/local/Homebrew  /usr/local/Homebrew
 ==> The Xcode Command Line Tools will be installed.  ==> The Xcode Command Line Tools will be installed.
 + 
 Press RETURN to continue or any other key to abort  Press RETURN to continue or any other key to abort
 + 
 インストールを続けるので,リターンキーを押下.  インストールを続けるので,リターンキーを押下.
 + 
 ==> Searching online for the Command Line Tools  ==> Searching online for the Command Line Tools
 ==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress  ==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
 Password:  Password:
 + 
 Macの開発環境であるXcodeのコマンドラインツールをインストールするので,ログインしているユーザのパスワードを入力.(ユーザアカウントには,管理者権限が必要)  Macの開発環境であるXcodeのコマンドラインツールをインストールするので,ログインしているユーザのパスワードを入力.(ユーザアカウントには,管理者権限が必要)
 + 
 ==> Installing the Command Line Tools (expect a GUI popup):  ==> Installing the Command Line Tools (expect a GUI popup):
 ==> /usr/bin/sudo /usr/bin/xcode-select --install  ==> /usr/bin/sudo /usr/bin/xcode-select --install
 xcode-select: note: install requested for command line developer tools  xcode-select: note: install requested for command line developer tools
 Press any key when the installation has completed.  Press any key when the installation has completed.
 + 
 何かキーを押すことで,インストールが始まるというので,リターンキーを押下.  何かキーを押すことで,インストールが始まるというので,リターンキーを押下.
 + 
 ==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools  ==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
 xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'  xcode-select: error: invalid developer directory '/Library/Developer/CommandLineTools'
 Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools  Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 エラーがでて失敗.invalid developer directory となっているので,インストール先のディレクトリである/Library/Developer/CommandLineToolsに問題がある模様.  エラーがでて失敗.invalid developer directory となっているので,インストール先のディレクトリである/Library/Developer/CommandLineToolsに問題がある模様.
 + 
 コマンドラインで,デベロッパ用のディレクトリを確認.  コマンドラインで,デベロッパ用のディレクトリを確認.
 + 
 MBA2013:Users ujpadmin$ /usr/bin/xcode-select -p  MBA2013:Users ujpadmin$ /usr/bin/xcode-select -p
 /Applications/Xcode.app/Contents/Developer  /Applications/Xcode.app/Contents/Developer
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 ディレクトリが異なる模様.  ディレクトリが異なる模様.
- +  
-**Xcodeをスイッチする [#ka74ca31+**Xcodeをスイッチする [#reae00d6
 + 
 Xcodeのインストールディレクトリが変更された?ようなので,コマンドラインで切り替える.  Xcodeのインストールディレクトリが変更された?ようなので,コマンドラインで切り替える.
 + 
 MBA2013:Users ujpadmin$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer  MBA2013:Users ujpadmin$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
 Password:  Password:
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 切り替えられたことを確認.  切り替えられたことを確認.
 + 
 MBA2013:Users ujpadmin$ xcode-select -p🆑  MBA2013:Users ujpadmin$ xcode-select -p🆑
 /Applications/Xcode.app/Contents/Developer  /Applications/Xcode.app/Contents/Developer
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 再度,HomeBrewのインストールを行う.  再度,HomeBrewのインストールを行う.
 + 
 MBA2013:Users ujpadmin$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"🆑  MBA2013:Users ujpadmin$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"🆑
 ==> This script will install:  ==> This script will install:
Line 95: Line 98:
 /usr/local/Homebrew  /usr/local/Homebrew
 ==> The Xcode Command Line Tools will be installed.  ==> The Xcode Command Line Tools will be installed.
 + 
 Press RETURN to continue or any other key to abort  Press RETURN to continue or any other key to abort
 ==> Searching online for the Command Line Tools  ==> Searching online for the Command Line Tools
Line 107: Line 110:
 Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools  Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 残念.エラーは変わらず.これは,インストーラがパスをハードコーディングしているから.  残念.エラーは変わらず.これは,インストーラがパスをハードコーディングしているから.
 以下のURLにあるスクリプトを確認して見ると...  以下のURLにあるスクリプトを確認して見ると...
 + 
 https://raw.githubusercontent.com/Homebrew/install/master/install  https://raw.githubusercontent.com/Homebrew/install/master/install
 + 
 いたるところに/Library/Developer/CommandLineToolsにスイッチするように記載がある...  いたるところに/Library/Developer/CommandLineToolsにスイッチするように記載がある...
- + インストーラを修正するのは恒久的なことを考えたら影響が大きいような気がするので,シンボリックリンクで対応する. 
-**/Library/Developer/CommandLineToolsのシンボリックリンクを作成 [#vac3d6b5+  
 +**/Library/Developer/CommandLineToolsのシンボリックリンクを作成 [#yb542a1f
 + 
 問題は/Library/Developer/CommandLineToolsがないことなので,最新の/Applications/Xcode.app/Contents/Developerへのシンボリックリンクを作成する.  問題は/Library/Developer/CommandLineToolsがないことなので,最新の/Applications/Xcode.app/Contents/Developerへのシンボリックリンクを作成する.
 + 
 まずは,現在の上位ディレクトリの確認.  まずは,現在の上位ディレクトリの確認.
 + 
 MBA2013:Users ujpadmin$ ls -la /Library/Developer🆑  MBA2013:Users ujpadmin$ ls -la /Library/Developer🆑
 total 0  total 0
Line 128: Line 132:
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 ここに,CommandLineToolsのリンクを作成する.  ここに,CommandLineToolsのリンクを作成する.
 + 
 MBA2013:Users ujpadmin$ sudo ln -s /Applications/Xcode.app/Contents/Developer /Library/Developer/CommandLineTools🆑  MBA2013:Users ujpadmin$ sudo ln -s /Applications/Xcode.app/Contents/Developer /Library/Developer/CommandLineTools🆑
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 リンクが作成されたか確認する.  リンクが作成されたか確認する.
 + 
 MBA2013:Users ujpadmin$ ls -la /Library/Developer🆑  MBA2013:Users ujpadmin$ ls -la /Library/Developer🆑
 total 0  total 0
Line 141: Line 145:
 drwxr-xr-x  4 root  admin  128  3 13 11:53 PrivateFrameworks  drwxr-xr-x  4 root  admin  128  3 13 11:53 PrivateFrameworks
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 これで,再度インストールを行う.  これで,再度インストールを行う.
- +  
-**HomeBrewをインストールする() [#r9590a47+**HomeBrewをインストールする() [#z7920d8b
- +  
 + 
 MBA2013:Users ujpadmin$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"🆑  MBA2013:Users ujpadmin$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"🆑
 ==> This script will install:  ==> This script will install:
Line 155: Line 159:
 /usr/local/etc/bash_completion.d/brew  /usr/local/etc/bash_completion.d/brew
 /usr/local/Homebrew  /usr/local/Homebrew
 + 
 Press RETURN to continue or any other key to abort🆑  Press RETURN to continue or any other key to abort🆑
 ==> Downloading and installing Homebrew...  ==> Downloading and installing Homebrew...
Line 195: Line 199:
 Already up-to-date.  Already up-to-date.
 ==> Installation successful!🆑  ==> Installation successful!🆑
 + 
 ==> Homebrew has enabled anonymous aggregate formulae and cask analytics.  ==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
 Read the analytics documentation (and how to opt-out) here:  Read the analytics documentation (and how to opt-out) here:
   https://docs.brew.sh/Analytics    https://docs.brew.sh/Analytics
 + 
 ==> Homebrew is run entirely by unpaid volunteers. Please consider donating:  ==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
   https://github.com/Homebrew/brew#donations    https://github.com/Homebrew/brew#donations
Line 207: Line 211:
     https://docs.brew.sh      https://docs.brew.sh
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
- +  
-**インストール後の確認処理 [#ee547d03+**インストール後の確認処理 [#vca9948c
 + 
 brew doctorコマンドで,インストールに問題なかったか確認.  brew doctorコマンドで,インストールに問題なかったか確認.
 + 
 MBA2013:Users ujpadmin$ brew doctor🆑  MBA2013:Users ujpadmin$ brew doctor🆑
 Your system is ready to brew.  Your system is ready to brew.
 MBA2013:Users ujpadmin$  MBA2013:Users ujpadmin$
 + 
 問題ない模様.  問題ない模様.
 + 
 MBA2013:Users ujpadmin$ brew --config🆑  MBA2013:Users ujpadmin$ brew --config🆑
 HOMEBREW_VERSION: 2.1.4  HOMEBREW_VERSION: 2.1.4


トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   ページ新規作成 全ページ一覧 単語検索 最新ページの一覧   ヘルプ   最新ページのRSS 1.0 最新ページのRSS 2.0 最新ページのRSS Atom
Counter: 1027, today: 1, yesterday: 0

広告スペース
Google