要在Ubuntu上自定義安裝路徑,可以按照以下步驟操作:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
~/.bashrc
或~/.zshrc
,添加以下內(nèi)容:export PATH="/path/to/custom/installation/dir/bin:$PATH"
export HOMEBREW_PREFIX="/path/to/custom/installation/dir"
export HOMEBREW_CELLAR="/path/to/custom/installation/dir/Cellar"
export HOMEBREW_REPOSITORY="/path/to/custom/installation/dir"
將/path/to/custom/installation/dir
替換為你希望安裝Homebrew的自定義路徑。
source ~/.bashrc
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
這樣,Homebrew就會被安裝到你指定的自定義路徑中。