由于国内某种特殊原因,我们访问很多repo源是有一定难度的,比如在Mac上非常好用的包管理软件Brew默认是没有安装的,所以需要我们首先安装Brew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
此时Brew已经安装成功了,但当我们满心欢喜以为大快朵颐的安装各种工具时发现居然报错,下载不了这,连接那又timeout,什么也安装不了,心肝迷茫和无助。
eric@EricdeMacBook-Pro ~ % brew install python3 Updating Homebrew...==> Auto-updated Homebrew!Updated 1 tap (homebrew/core).==> Updated Formulaeaws-sdk-cpp fonttools hsd memcached mpd okteto pspg sqlmapbmake gmsh hwloc mercurial nethogs onscripter pueue strongswancfn-lint goreleaser libvirt minio nfdump openimageio quantlibcimg grpc libzdb minio-mc nim pagmo shunit2cjson haproxy mdbook monolith nomad phpmd spim ==> Installing dependencies for python: openssl@1.1, sqlite and xz==> Installing python dependency: openssl@1.1==> Downloading https://homebrew.bintray.com/bottles/openssl@1.1-1.1.1f.catalina.bottle.tar.gz-=O=- # # # # curl: (7) Failed to connect to akamai.bintray.com port 443: Operation timed outError: Failed to download resource "openssl@1.1"Download failed: https://homebrew.bintray.com/bottles/openssl@1.1-1.1.1f.catalina.bottle.tar.gzWarning: Bottle installation failed: building from source.==> Downloading https://www.openssl.org/source/openssl-1.1.1f.tar.gz######################################################################## 100.0%==> perl ./Configure --prefix=/usr/local/Cellar/openssl@1.1/1.1.1f --openssldir=/usr/local/etc/openssl@1.1 no-ssl3 no-==> make==> make test==> make install MANDIR=/usr/local/Cellar/openssl@1.1/1.1.1f/share/man MANSUFFIX=ssl==> CaveatsA CA file has been bootstrapped using certificates from the systemkeychain. To add additional certificates, place .pem files in /usr/local/etc/openssl@1.1/certs and run /usr/local/opt/openssl@1.1/bin/c_rehash openssl@1.1 is keg-only, which means it was not symlinked into /usr/local,because openssl/libressl is provided by macOS so don't link an incompatible version.
其实这一切的问题是在于我们安装的brew默认repo是官方的repo,出于国内特色原因无法连接;所以使用 Alibaba 的 Homebrew 镜像源进行加速后问题就迎刃而解。
平时我们执行 brew 命令安装软件的时候,跟以下 3 个仓库地址有关:
cd "$(brew --repo)"git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
还原
cd "$(brew --repo)"git remote set-url origin https://github.com/Homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
还原
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://github.com/Homebrew/homebrew-core.git
这个步骤跟你的 macOS 系统使用的 shell 版本有关系,先来查看当前使用的 shell 版本
echo $SHELL/bin/zsh
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrcsource ~/.zshrc
还原
vi ~/.zshrc# 然后,删除 HOMEBREW_BOTTLE_DOMAIN 这一行配置source ~/.zshrc
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profilesource ~/.bash_profile
还原
vi ~/.bash_profile# 然后,删除 HOMEBREW_BOTTLE_DOMAIN 这一行配置source ~/.bash_profile
配置完后再去安装下某些工具和module时就能发现畅快无比了
eric@EricdeMacBook-Pro homebrew-core % brew install python3 ==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles/python-3.7.7.catalina.bottle.tar.gz######################################################################## 100.0%==> Pouring python-3.7.7.catalina.bottle.tar.gz==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/==> /usr/local/Cellar/python/3.7.7/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/==> CaveatsPython has been installed as /usr/local/bin/python3 Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to`python3`, `python3-config`, `pip3` etc., respectively, have been installed into /usr/local/opt/python/libexec/bin You can install Python packages with pip3 install <package>They will install into the site-package directory /usr/local/lib/python3.7/site-packages See: https://docs.brew.sh/Homebrew-and-Python==> Summary🍺 /usr/local/Cellar/python/3.7.7: 4,006 files, 61.2MB
作者:瞄不准的亚瑟
链接:https://www.jianshu.com/p/9ad2fe2b2c23
来源:简书
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
原网址: 访问
创建于: 2021-05-19 20:19:08
目录: default
标签: 无
未标明原创文章均为采集,版权归作者所有,转载无需和我联系,请注明原出处,南摩阿彌陀佛,知识,不只知道,要得到
java windows火焰图_mob64ca12ec8020的技术博客_51CTO博客 - 在windows下不可行,不知道作者是怎样搞的 监听SpringBoot 服务启动成功事件并打印信息_监听springboot启动完毕-CSDN博客 SpringBoot中就绪探针和存活探针_management.endpoint.health.probes.enabled-CSDN博客 u2u转换板 - 嘉立创EDA开源硬件平台 Spring Boot 项目的轻量级 HTTP 客户端 retrofit 框架,快来试试它!_Java精选-CSDN博客 手把手教你打造一套最牛的知识笔记管理系统! - 知乎 - 想法有重合-理论可参考 安宇雨 闲鱼 机械键盘 客制化 开贴记录 文本 linux 使用find命令查找包含某字符串的文件_beijihukk的博客-CSDN博客_find 查找字符串 ---- mac 也适用 安宇雨 打字音 记录集合 B站 bilibili 自行搭建 开坑 真正的客制化 安宇雨 黑苹果开坑 查找工具包maven pom 引用地 工具网站 Dantelis 介绍的玩轴入坑攻略 --- 关于轴的一些说法 --- 非官方 ---- 心得而已 --- 长期开坑更新 [本人问题][新开坑位]关于自动化测试的工具与平台应用 机械键盘 开团 网站记录 -- 能做一个收集的程序就好了 不过现在没时间 -- 信息大多是在群里发的 - 你要让垃圾佬 都去一个地方看难度也是很大的 精神支柱 [超级前台]sprinbboot maven superdesk-app 记录 [信息有用] [环境准备] [基本完成] [sebp/elk] 给已创建的Docker容器增加新的端口映射 - qq_30599553的博客 - CSDN博客 [正在研究] Elasticsearch, Logstash, Kibana (ELK) Docker image documentation elasticsearch centos 安装记录 及 启动手记 正式服务器 39 elasticsearch 问题合集 不断更新 6.1.1 | 6.5.1 两个版本 博客程序 - 测试 - bug记录 等等问题 laravel的启动过程解析 - lpfuture - 博客园 OAuth2 Server PHP 用 Laravel 搭建带 OAuth2 验证的 RESTful 服务 | Laravel China 社区 - 高品质的 Laravel 和 PHP 开发者社区 利用Laravel 搭建oauth2 API接口 附 Unauthenticated 解决办法 - 煮茶的博客 - SegmentFault 思否 使用 OAuth2-Server-php 搭建 OAuth2 Server - 午时的海 - 博客园 基于PHP构建OAuth 2.0 服务端 认证平台 - Endv - 博客园 Laravel 的 Artisan 命令行工具 Laravel 的文件系统和云存储功能集成 浅谈Chromium中的设计模式--终--Observer模式 浅谈Chromium中的设计模式--二--pre/post和Delegate模式 浅谈Chromium中的设计模式--一--Chromium中模块分层和进程模型 DeepMind 4 Hacking Yourself README.md update 20211011
Laravel China 简书 知乎 博客园 CSDN博客 开源中国 Go Further Ryan是菜鸟 | LNMP技术栈笔记 云栖社区-阿里云 Netflix技术博客 Techie Delight Linkedin技术博客 Dropbox技术博客 Facebook技术博客 淘宝中间件团队 美团技术博客 360技术博客 古巷博客 - 一个专注于分享的不正常博客 软件测试知识传播 - 测试窝 有赞技术团队 阮一峰 语雀 静觅丨崔庆才的个人博客 软件测试从业者综合能力提升 - isTester IBM Java 开发 使用开放 Java 生态系统开发现代应用程序 pengdai 一个强大的博主 HTML5资源教程 | 分享HTML5开发资源和开发教程 蘑菇博客 - 专注于技术分享的博客平台 个人博客-leapMie 流星007 CSDN博客 - 舍其小伙伴 稀土掘金 Go 技术论坛 | Golang / Go 语言中国知识社区
最新评论