brew install时一直卡在Updating怎么办
文章目录
前言
当你通过brew安装软件的时候,
发现一只卡在Updating
Updating Homebrew...
这个时候有俩种办法来应对
- 找国内的源Updating Homebrew
- brew install 时不要 update
切换国内的源
//替换brew源
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/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
更换完国内源以后升级
brew update
更新列表:
Updated 1 tap (homebrew/core).
==> New Formulae
abseil findent mtoc
ansible@2.8 findomain nauty
apollo-cli flint nebula
archiver forcecli newrelic-cli
asymptote gh nift
awscli@1 git-annex-remote-rclone node-sass
awscurl git-filter-repo okteto
azcopy git-gui openlibm
b3sum git-remote-gcrypt poetry
baidupcs-go git-trim polynote
bandwhich gitbatch powerline-go
bic glow protoc-gen-grpc-web
biosig gnirehtet prover9
blis go@1.13 psc-package
bnfc gotop publish
cacli grex pueue
cargo-instruments hdf5@1.10 python@3.8
cassandra-cpp-driver hdt qp
ccfits helib raxml-ng
cctz hpack ruby@2.6
cedille iam-policy-json-to-terraform rubyfmt
celero iblinter run
cgns imgproxy sampler
cmt instalooter seal
cobalt katago skymaker
container-structure-test kcptun sniffglue
corral keydb swift-format
cppman killswitch swift-sh
crc komposition talisman
db-vcs libb64 terraform-provider-libvirt
detekt libcbor terrahelp
dhall-lsp-server libdeflate texlab
dhall-yaml libffcall tlx
diesel libfido2 tty-share
docker-slim libraqm uni
dsvpn libserdes vpn-slice
dynet liquidctl wapm
ensmallen literate-git wasm3
eureka mavsdk wasmer
faiss meilisearch whistle
fastlane mlpack wordgrinder
ffuf mmctl xclogparser
fileicon mockolo yaegi
==> Updated Formulae
c-ares ✔ glfw onnxruntime
curl-openssl ✔ glib-networking onscripter
freetds ✔ glibmm ooniprobe
glib ✔ global opa
gmp ✔ glooctl opam
jpeg ✔ gloox open-image-denoise
libev ✔ glslang open-mpi
libpq ✔ glslviewer open-scene-graph
libzip ✔ gmic openal-soft
openldap ✔ gmime openapi-generator
pcre ✔ gmsh openblas
php ✔ gmt opencascade
php@7.2 ✔ gmt@5 opencv
postgresql@10 ✔ gnome-autoar opencv@2
python ✔ gnu-getopt opencv@3
readline ✔ gnu-sed openexr
redis ✔ gnunet openfortivpn
sqlite ✔ gnupg openimageio
webp ✔ gnuplot openjdk
xz ✔ gnuradio openjdk@11
abcm2ps gnutls opensc
abcmidi go openssh
abyss go-bindata openttd
ace go-jira openvdb
ack go-statik operator-sdk
acpica go@1.12 orc
activemq gobject-introspection orientdb
advancemenu gocr ortp
adwaita-icon-theme godep osc
agda golang-migrate osm2pgsql
agedu golo osmium-tool
aircrack-ng gom osquery
akamai google-authenticator-libpam osslsigncode
akka goreleaser ott
alexjs goreman overmind
algernon gosu p11-kit
aliyun-cli goto pacapt
allegro govc packer
allure gprof2dot packetq
alot gptfdisk packmol
alp gr-osmosdr pagmo
alpine gradle paket
alure grafana pandoc
amazon-ecs-cli grails pandoc-citeproc
ammonite-repl grakn pandoc-crossref
amqp-cpp graph-tool paps
amtk graphicsmagick par2
angle-grinder graphviz parallel
angular-cli grep parallelstl
annie grin pari
ansible grin-wallet partio
ansible-lint gromacs passenger
ansifilter groonga passwdqc
ansiweather groovy pastel
ant groovysdk pcapplusplus
antibody grpc pcb
antlr grpc-swift pcl
antlr4-cpp-runtime grpcurl pcsc-lite
antlr@2 gsasl pdal
apache-archiva gsettings-desktop-schemas pdf-redact-tools
apache-arrow gsoap pdfcpu
apache-arrow-glib gspell pdfpc
apache-ctakes gssdp pdftk-java
apache-drill gst-editing-services pdftoipe
apache-flink gst-libav pdns
apache-forrest gst-plugins-bad pdnsrec
apache-geode gst-plugins-base pdsh
apache-opennlp gst-plugins-good peco
apache-spark gst-plugins-ugly percol
apachetop gst-python percona-toolkit
apibuilder-cli gst-rtsp-server perl
apktool gst-validate perltidy
apollo gstreamer petsc
appium gti petsc-complex
appscale-tools gtk+3 pgbadger
appstream-glib gtk-mac-integration pgcli
aptly gtkdatabox pgformatter
arangodb gtksourceview4 pgpool-ii
arcade-learning-environment gtranslator pgroonga
arduino-cli gts pgrouting
argyll-cms guile pgweb
arm-linux-gnueabihf-binutils gupnp phoronix-test-suite
armadillo gwyddion php-code-sniffer
arp-sk gx php@7.3
arpack h264bitstream phpmd
arping h3 phpmyadmin
arpoison hadolint phpstan
artifactory hadoop phpunit
asciidoctorj handbrake pianod
asciinema hapi-fhir-cli picard-tools
asdf haproxy picat
asio haxe pig
ask-cli hcloud pioneer
aspectj hdf5 pipenv
assimp healpix pipx
astrometry-net helm pjproject
atari800 helm@2 pkcs11-helper
atdtool helmfile plank
atlantis helmsman plantuml
atlassian-cli help2man platformio
ats2-postiats hevea pmd
audacious hexyl pnetcdf
auditbeat hey pnpm
aurora-cli hg-fast-export poco
autopep8 highlight pod2man
autorest hledger points2grid
avro-c hlint pony-stable
avro-cpp hmmer ponyc
avro-tools homeassistant-cli poppler
aws-cdk homebank postgis
aws-cfn-tools hopenpgp-tools postgresql
aws-elasticbeanstalk hostess postgresql@11
aws-google-auth howdoi postgresql@9.4
aws-iam-authenticator hstr postgresql@9.5
aws-okta htmldoc postgresql@9.6
aws-sdk-cpp htslib powerman
aws-shell http-parser pre-commit
awscli http-server prestodb
awslogs httpie prestosql
awsume hub primesieve
axel hugo procs
azure-cli hyperkit procyon-decompiler
azure-storage-cpp i2p profanity
babel i2pd proftpd
babl i386-elf-gdb proguard
bacula-fd ibex proj
bagit icecast prometheus
balena-cli icecream proselint
ballerina idnits proteinortho
bandcamp-dl igraph protobuf
bareos-client igv protobuf-c
baresip ilmbase protoc-gen-go
basex imagemagick psftools
bash imagemagick@6 pspg
bash-completion@2 imapfilter psqlodbc
bashdb imlib2 pssh
batik inadyn pstoedit
bazel inlets pugixml
bazelisk insect pulumi
bcal inspircd pumba
bcftools interactive-rebase-tool purescript
bde internetarchive pushpin
beagle ioping puzzles
bear ios-deploy pwntools
beast ios-sim py2cairo
bedtools ios-webkit-debug-proxy py3cairo
benthos iozone pyenv
bento4 ipfs pyenv-virtualenv
berglas ipmiutil pygitup
bfg ipopt pygments
bibtexconv ipython pygobject3
binaryen isc-dhcp pyinstaller
bind isl pyinvoke
bindfs istioctl pylint
bingrep itex2mml pympress
binutils itk pypy
bison ivy pypy3
bit jack pyqt
bitcoin jadx python-markdown
bitlbee jam python-yq
bitrise janet pyvim
bitwarden-cli jasmin q
bitwise javacc qalculate-gtk
black jbig2dec qbs
blast jboss-forge qca
blazegraph jdnssec-tools qemu
blink1 jdupes qjackctl
bluepill jena qmmp
bmake jenkins qpdf
bnd jenkins-job-builder qpid-proton
bonnie++ jenkins-lts qrupdate
boost jetty qscintilla2
boost-bcp jetty-runner qt
boost-build jflex qtkeychain
boost-mpi jfrog-cli-go quantlib
boost-python jhead quickjs
boost-python3 jhipster qxmpp
boot-clj jinja2-cli r
borgmatic joplin rabbitmq
botan joshua rabbitmq-c
bowtie2 jpeg-turbo radamsa
brew-php-switcher jrnl radare2
broot jruby rakudo
buildifier jsonnet rakudo-star
buildkit jsonschema2pojo rancid
buku jsvc range-v3
bumpversion juise ranger
bundletool juju ratfor
bup juju-wait rav1e
byacc jump rawtoaces
byobu jupyterlab raylib
byteman just rbspy
bzt jvgrep rclone
c-blosc k3d rds-command-line-tools
caddy k6 re-flex
caf kafka re2
cafeobj kaitai-struct-compiler re2c
caffe kakoune rebar3
cake kallisto recon-ng
calabash kapacitor redpen
calceph kawa remarshal
calicoctl kcov remctl
camlp5 keepkey-agent remind
cargo-c kepubify reminiscence
cargo-completion kerl renameutils
carla khard repo
carrot2 kibana rethinkdb
cartridge-cli kind rex
cassandra kitchen-sync rhash
cassandra@2.1 knot rhino
cassandra@2.2 knot-resolver riemann
catch2 kobalt riff
ccache kompose ripgrep
ccls kops rke
ccm kotlin rocksdb
cdk krakend rom-tools
cdogs-sdl krb5 root
cereal krew roswell
ceres-solver ktlint rpcgen
certbot ktoblzcheck rsnapshot
certigo kube-aws rst-lint
cf-tool kubecfg rsyslog
cfengine kubectx rtags
cfitsio kubeless rtv
cfn-lint kubeprod ruby
cfr-decompiler kubernetes-cli ruby-build
cfssl kubeseal ruby@2.4
注意:如果换上面的源以后还是不能顺利update,那么你要更换其他的源
install时关闭update
推荐此选项,brew install 时将不再检测更新.
vim ~/.bash_profile
// 新增一行
export HOMEBREW_NO_AUTO_UPDATE=true
还原配置
当你折腾一圈发现依然不行,下面的步骤可以让你还原之前的brew源
//重置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