homebrew在ubuntu上的自定义安装路径

   2024-10-01 5370
核心提示:要在Ubuntu上自定义安装路径,可以按照以下步骤操作:首先,下载Homebrew的安装脚本并运行:/bin/bash -c $(curl -fsSL https://

要在Ubuntu上自定义安装路径,可以按照以下步骤操作:

首先,下载Homebrew的安装脚本并运行:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
然后,编辑Homebrew的配置文件~/.bashrc~/.zshrc,添加以下内容:
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
最后,重新安装Homebrew到自定义路径:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

这样,Homebrew就会被安装到你指定的自定义路径中。

 
举报打赏
 
更多>同类物流大全
推荐图文
推荐物流大全
点击排行

网站首页  |  关于我们  |  联系方式网站留言    |  赣ICP备2021007278号