brew更换为国内源

转自

https://www.jianshu.com/p/4721ef4c7a0e

# 替换brew.git:
 cd "$(brew --repo)"
# 中国科大:
 git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
# 清华大学:
 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.ustc.edu.cn/homebrew-core.git
# 清华大学:
 git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

# 替换homebrew-bottles:
# 中国科大:
 echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles‘ >> ~/.bash_profile
 source ~/.bash_profile
# 清华大学:
 echo ‘export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles‘ >> ~/.bash_profile
 source ~/.bash_profile

# 应用生效:
 brew update

# 重置brew.git:
 cd "$(brew --repo)"
 git remote set-url origin https://github.com/Homebrew/brew.git

# 重置homebrew-core.git:
 cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
 git remote set-url origin https://github.com/Homebrew/homebrew-core.git

原文地址:https://www.cnblogs.com/zunwen/p/12597654.html

时间: 2024-08-30 13:15:21

brew更换为国内源的相关文章

Brew 替换为国内源Mac

# 替换brew.git cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git # 替换homebrew-core.git cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/

更换pip国内源

pip国内的一些镜像   阿里云 https://mirrors.aliyun.com/pypi/simple/  中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/  豆瓣(douban) http://pypi.douban.com/simple/  清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/  中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/ 修改源

7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装

7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 扩展 1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm # 7.6  yum更换国内源 ![mark](http://oqxf7c508.bkt.clouddn.com/blog/20170812/154757717.png?imagesl

yum更换国内源、下载rpm包,源码包安装

yum更换国内源 yum本身自带的yum是国外的地址,国内下载会比较慢. 配置163yum源 rm -f dvd.repo  删除之前默认的yum源 使用wget或curl命令后,生产新的yum源文件CentOS7-Base-163.repo 查看CentOS7-Base-163.repo 下载rpm包 安装扩展epel,yum install -y epel-release安装epel包,目录下生成epel.repo和epel-testing.repo文件. yum list 查看rpm包(y

5周第2次课 yum更换国内源 yum下载rpm包 源码包安装

1. yum 更换国内源 系统内置的源很多时候都是官方的,大部分在国外,使用起来不是很快,也很难下载,这时候最好使用国内的源,如163 1.1 删除系统中自带的 yum源配置文件 mv CentOS-Base.repo CentOS-Base.repo.bak 1.2 下载网易 yum 源的配置文件 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo 或者curl -O http://mirrors.163.com/.help/Cent

7.6 yum更换国内源;7.7 yum下载rpm包;7.8 -7.9 源码包安装

扩展: 1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm 7.6 yum更换国内源 1. 进入/etc/yum.repos.d目录下: [[email protected] ~]# cd /etc/yum.repos.d 2. 删除本地仓库配置文件:rm -f 仓库配置文件 [[email protected] yum.

五周第二次课(1月9日) 7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装

五周第二次课(1月9日)7.6 yum更换国内源7.7 yum下载rpm包7.8/7.9 源码包安装扩展1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm 命令::================================================================================

yum更换国内源、yum下载rpm包和源码包安装

一.yum更换国内源 1.先进入目录:cd /etc/yum.repos.d/ 2.删除对应的repo文件或重命名它:rm -f dvd.repo 或 mv dvd.repo dvd.repo.bak (删除前确认一下wget命令有没有安装,如果没有先用命令安装再删除:yum install -y wget) [[email protected] yum.repos.d]# mv dvd.repo dvd.repo.bak 3.再用命令下载对应的repo源:wget http://mirrors

yum搭建本地仓库、更换国内源、下载rpm包

1.yum搭建本地仓库 有时候yum不能使用,因为Linux没有办法联网.默认的yum仓库是需要远程连接资源的,连接网站的,从网站里面下载rpm安装包,然后再安装.如果不能联网,yum是否就不能使用了呢?也不是的,我们可以搭建一个本地的yum仓库,在本地的路径里面找rpm安装包.操作这些步骤的前提,首先需要一个光驱.光盘或是镜像文件,挂载到 /mnt/ 下.下面可能会删除一些文件,删除之前先做一个备份,见下图, 输入 vi dvd.repo ,回车,进入编辑, 接下来清除缓存,见下图, 用 yu