Linuxbrew安装
The Homebrew package manager for Linux
安装linuxbrew
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
安装脚本可能会使用sudo将Linuxbrew安装到/home/linuxbrew/.linuxbrew
,也可能会安装到 ~/.linuxbrew
的主目录中。Linuxbrew在安装后不使用sudo。使用/home/linuxbrew/.linuxbrew
可以使用比安装在个人主目录中更多的二进制包(瓶子)。
按照“下一步”的说明将Linuxbrew添加到您的 PATH
和bash shell配置文件脚本中,可以在Debian/Ubuuntu上添加~/.profile
,也可以在CentOS/Fedora/RedHat上添加 ~/.bash_profile
。
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -d /home/linuxbrew/.linuxbrew && eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
test -r ~/.profile && echo "eval $($(brew --prefix)/bin/brew shellenv)" >>~/.profile
echo "eval $($(brew --prefix)/bin/brew shellenv)" >>~/.profile
source ~/.profile
brew install hello
如果您使用的是较旧版本的Linux,安装第一个软件包也会安装最新版本的glibc和gcc。
linuxbrew必装包
brew常用命令
-
brew shellenv
打印导出语句。在shell中运行它们,Homebrew的安装将包含在您的PATH、MANPATH和INFOPATH中。HOMEBREW_PREFIX、HOMEBREW_CELLAR和HOMEBREW_REPOSITORY也会被导出以保存这些变量的多个查询。
您也可以考虑使用eval$(brew shellenv)
在dotfiles中添加评估输出。brew shellenv
export HOMEBREW_PREFIX="/home/linuxbrew/.linuxbrew" export HOMEBREW_CELLAR="/home/linuxbrew/.linuxbrew/Cellar" export HOMEBREW_REPOSITORY="/home/linuxbrew/.linuxbrew/Homebrew" export PATH="/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH" export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH" export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH"
linuxbrew注意事项
假如用linuxbrew
安装的Python
会替换系统默认的Python
。
如需还原则需要将~/.profile
文件中的eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
这一行屏蔽:
# linuxbrew
#eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
原文地址:https://blog.csdn.net/m0_61531676/article/details/129908260
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_25390.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!