安裝Homebrew被折騰小記

Homebrew是一款Mac OS平臺(tái)下的軟件包管理工具,擁有安裝、卸載、更新、查看、搜索等很多實(shí)用的功能。最近做短視頻播放的App,開始時(shí)用了七牛的PLPlayer,而聞?wù)f基于FFMPEG的ijkplayer更熱門,于是想探索一下,然而第一步安裝homebrew就卡住了。

打開終端,輸入:

/usr/bin/ruby -e"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

然而,終端一直報(bào)錯(cuò):

fatal: cannot copy '/Library/Developer/CommandLineTools/usr/share/git-core/templates/hooks/fsmonitor-watchman.sample' to '/usr/local/Homebrew/.git/hooks/fsmonitor-watchman.sample': Permission denied

Failed during: git init -q

最終

//確保目錄歸屬管理組

sudo chgrp -R admin /usr/local

//確保管理組可讀

sudo chmod -R g+w /usr/local

安裝成功,問題又來了

command not find...

翻閱各種博客,說是環(huán)境變量Path中沒有路徑/usr/local/bin

sudo vim .bash_profile //1.打開.bash_profile

export PATH=/usr/local/bin:$PATH? 2.為PATH添加/usr/local/bin的路徑

source .bash_profile 3.更新配置后的環(huán)境變量

測(cè)試命令是否能行

brew -v,搞掂吃碗面,能用了····折騰

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容