美文网首页
使用homebrew管理linux和mac软件

使用homebrew管理linux和mac软件

作者: 生信探索 | 来源:发表于2023-04-06 09:00 被阅读0次

<众~号@生信探索>

添加镜像

linux和apple都一样,先添加变量

export HOMEBREW_INSTALL_FROM_API=1
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"

export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"

Apple M2

  • 安装CLT for Xcode
xcode-select --install
  • 安装brew
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
/bin/bash brew-install/install.sh
rm -rf brew-install
  • 加入环境变量
test -r ~/.bash_profile && echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.bash_profile
test -r ~/.zprofile && echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile

Ubuntu 22.4

需要git 和 curl

无root

  • 安装到~/homebrew
cd ~
mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
  • 加入环境变量
mkdir -p ~/APP/bin
export PATH=$HOME/APP/bin:$PATH
ln -s $HOME/homebrew/bin/brew $HOME/APP/bin/brew

有root

  • 安装
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
/bin/bash brew-install/install.sh
rm -rf brew-install
  • 加入环境变量
test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.bash_profile
test -r ~/.profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.profile
test -r ~/.zprofile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >> ~/.zprofile

更新

brew update

Uninstall

-p是homebrew的安装路径,root安装的homebrew有默认路径,不需要卸载的时候指定这个参数

cd ~
wget https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh
bash uninstall.sh -p ~/homebrew

安装mamba

  • linux

linux上只能安装micromamba

brew install micromamba
# 手动安装mamba
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash Mambaforge-Linux-x86_64.sh
  • Apple M2
brew install --cask mambaforge
# 单细胞分析环境
mamba create -n SC && mamba activate SC
mamba install -y -c conda-forge python=3.10 notebook ipywidgets pandas numpy seaborn matplotlib ipykernel openpyxl pyarrow scanpy python-igraph leidenalg pytables jaxlib leidenalg

Reference

https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
https://docs.brew.sh/Installation#alternative-installs

相关文章

  • Mac上安装Homebrew

    Homebrew是Mac上的软件包管理工具,使用该工具能够很方便的在Mac上安装和卸载软件。 一、Homebrew...

  • Homebrew管理Mac软件

    title: 使用Homebrew优雅的管理Mac软件tags: Homebrew,MacOS 什么是Homebr...

  • 为brew cask 编写一个升级脚本

    使用Mac以及在Mac上使用homebrew来管理软件的同学都知道,homebrew-cask并没有提供brew ...

  • Mac OS安装mongodb

    1.使用Homebrew软件包管理工具安装 brew 又叫Homebrew,是Mac OSX上的软件包管理工具,能...

  • HomeBrew 介绍&安装

    1. 简介 HomeBrew 是 Mac OSX 上的软件管理工具,类似于 Linux 的 apt-get 和 W...

  • HomeBrew,Mac上的开发者利器

    HomeBrew - MacOs的包管理和软件管理工具 简介 Mac OS因为是Unix-like系统,可以使用很...

  • Mac OSX上的各种软件包管理工具

    一、软件包管理工具 1. Homebrew Homebrew,是Mac OSX上的软件包管理工具,能在Mac中方便...

  • HomeBrew

    介绍 Homebrew是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件,Homebrew...

  • brew和gem

    HomeBrew Homebrew,是Mac OS X上的软件包管理工具,我们能够通过终端方便的使用它来安装管理苹...

  • Homebrew and Homebrew Services

    Homebrew Homebrew简称brew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者...

网友评论

      本文标题:使用homebrew管理linux和mac软件

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