美文网首页
Ubuntu安装及卸载brew

Ubuntu安装及卸载brew

作者: YuWenHaiBo | 来源:发表于2019-04-11 14:32 被阅读0次

网站:http://linuxbrew.sh/

一、安装:

不能在root下运行

$sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
- Add Linuxbrew to your PATH

    PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"

- We recommend that you install GCC by running:

    brew install gcc

- Run `brew help` to get started

- Further documentation: 

    https://docs.brew.sh

Warning: /home/ubuntu/.linuxbrew/bin is not in your PATH.

设置路径:

$export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"

这里参考设置环境变量
linux 修改配置文件

二、卸载:

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

The following possible Homebrew files were not deleted:

/home/linuxbrew/.linuxbrew/share/

/home/linuxbrew/.linuxbrew/etc/

/home/linuxbrew/.linuxbrew/lib/

/home/linuxbrew/.linuxbrew/var/

You may wish to remove them yourself.

需要手动删除文件夹:

$rm -r -f /home/linuxbrew/.linuxbrew

三、更换源

brew默认的源速度太慢了,可以替换成国内的清华大学提供的源

1.Homebrew 的 formula 索引的镜像(即brew update时所更新内容)
替换brew.git
这里$(brew --repo) 是/home/linuxbrew/.linuxbrew/Homebrew
$ cd "$(brew --repo)"
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
替换homebrew-core.git
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
$ brew update

2. Homebrew 二进制预编译包的镜像(注: 2.1 2.2 任选其一)    
 2.1 临时替换(关闭终端再次打开终端时配置失效,使用默认配置)   
 export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles    
 2.2 长期替换(建议使用此项配置)  
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles'>>   ~/.bash_profile   
source ~/.bash_profile  
 #执行.bash_profile脚本让配置即时生效

注意:
linux 必须先安装gcc,很多软件编译还是得用apt下载gcc和g++,make,cmake,还有环境配置,不是很好用

参考链接

Ubuntu安装及卸载brew
在Linux安装和使用LinuxBrew

相关文章

  • Ubuntu安装及卸载brew

    网站:http://linuxbrew.sh/ 一、安装: 不能在root下运行 这里参考设置环境变量linux ...

  • 1 Mac下MySQL安装卸载与配置

    1 Mac下MySQL安装卸载与配置 1 MySQL的安装、启动及卸载 1.1 MySQL的安装 安装brew: ...

  • Homebrew命令

    使用brew安装软件 比如安装git:brew install git 使用brew卸载软件 使用brew查询软件...

  • ubuntu 安装brew

    转载:Ubuntu 下安装和配置 Homebrew 安装依赖 安装brew 配置brew 检查安装:brew he...

  • ubuntu 16.04一些备忘

    redis下载及安装 ubuntu 16.04安装redis的两种方式(apt和编译方式)和卸载ubuntu临时修...

  • mac 安装php7

    如果之前安装过,卸载 $ brew uninstall php70 安装 $ brew tap homebrew/...

  • Mac下用Homebrew安装android环境

    安装 Homebrew 安装软件,如:brew install oclint卸载软件,如:brew uninsta...

  • homebrew命令

    查看brew的帮助 brew –help 安装软件 brew install git 卸载软件 brew unin...

  • brew命令行

    查看brew的帮助 brew –help 安装软件 brew install git 卸载软件 brew unin...

  • nvm 安装成功之后重启终端失效(command not fou

    nvm传送门 1、卸载nvm(此处使用的是brew卸载) 2、使用Curl安装(不推荐使用brew安装,有bug)...

网友评论

      本文标题:Ubuntu安装及卸载brew

      本文链接:https://www.haomeiwen.com/subject/xkptwqtx.html