mac 安裝 brew wget出錯 No formula or cask found for “wget“

安裝brew

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

如果出現什麼連接拒絕的錯

sudo vim /etc/hosts

添加一些GitHub的主機名

:~|⇒   brew install wget
Updating Homebrew...
Error: No available formula with the name "wget"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
  git -C "$(brew --repo homebrew/core)" fetch --unshallow

Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
~|⇒  brew search wget
Warning: Cask 'copyq' is unreadable: undefined method `method_missing_message' for Utils:Module
No formula or cask found for "wget".
Closed pull requests:
Add AirtestIDE 1.2.3 (https://github.com/Homebrew/homebrew-cask/pull/80297)
Aflplusplus (https://github.com/Homebrew/homebrew-core/pull/50873)
Add support for Whalebrew to bundle (https://github.com/Homebrew/homebrew-bundle/pull/656)
hugo 0.69.0 (https://github.com/Homebrew/homebrew-core/pull/52816)
Add SHA256 sum to keyboard-cleaner 1.2 cask (https://github.com/Homebrew/homebrew-cask/pull/78230)
Fetch formula resources before unlinking during upgrade. (https://github.com/Homebrew/brew/pull/7124)
Update .rubocop.yml (https://github.com/Homebrew/brew/pull/7258)
bombadillo 2.3.1 (new formula) (https://github.com/Homebrew/homebrew-core/pull/54718)
Skip tapping homebrew/cask when on Linux (https://github.com/Homebrew/homebrew-bundle/pull/660)
osmfilter: adding zlib-dependency (https://github.com/Homebrew/linuxbrew-core/pull/20132)
radamsa 0.6 (https://github.com/Homebrew/homebrew-core/pull/51125)
Update skype from 8.55.0.141 to 8.56.0.103 (https://github.com/Homebrew/homebrew-cask/pull/76434)
Fix accessibility issues (https://github.com/Homebrew/brew.sh/pull/441)
wget: Build a bottle for Linux (https://github.com/Homebrew/linuxbrew-core/pull/17585)
wget: revision for OpenSSL 1.1 (https://github.com/Homebrew/homebrew-core/pull/47071)
wiredtiger 3.2.1 (https://github.com/Homebrew/homebrew-core/pull/51348)
monolith 2.0.16 (new formula) (https://github.com/Homebrew/homebrew-core/pull/47033)
libosinfo 1.7.1 (https://github.com/Homebrew/homebrew-core/pull/47460)
Merge 2019-11-23 3c4768deeb (https://github.com/Homebrew/linuxbrew-core/pull/17575)
WIP: Add KnightOS SDK (https://github.com/Homebrew/homebrew-core/pull/49912)

報上面的錯誤的話 我的辦法是修改鏡像源 不然之前安裝很慢

替換homebrew源

替換homebrew默認源

cd “$(brew --repo)”
git remote set-url origin git://mirrors.ustc.edu.cn/brew.git

替換homebrew-core源

cd “$(brew --repo)/Library/Taps/homebrew/homebrew-core”
git remote set-url origin git://mirrors.ustc.edu.cn/homebrew-core.git

brew更新

brew update

brew install wget
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/gettext-0.20.2_1.catalina.b
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/libunistring-0.9.10.catalin
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/libidn2-2.3.0.catalina.bott
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/openssl%401.1-1.1.1g.catali
######################################################################## 100.0%
==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/wget-1.20.3_2.catalina.bott
######################################################################## 100.0%
==> Installing dependencies for wget: gettext, libunistring, libidn2 and [email protected]
==> Installing wget dependency: gettext
==> Pouring gettext-0.20.2_1.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/gettext/0.20.2_1: 1,923 files, 18.6MB
==> Installing wget dependency: libunistring
==> Pouring libunistring-0.9.10.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/libunistring/0.9.10: 54 files, 4.4MB
==> Installing wget dependency: libidn2
==> Pouring libidn2-2.3.0.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/libidn2/2.3.0: 70 files, 727.8KB
==> Installing wget dependency: [email protected]
==> Pouring [email protected]
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/[email protected]/certs

and run
  /usr/local/opt/[email protected]/bin/c_rehash

[email protected] is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

For compilers to find [email protected] you may need to set:
  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

==> Summary
🍺  /usr/local/Cellar/[email protected]/1.1.1g: 8,059 files, 18MB
==> Installing wget
==> Pouring wget-1.20.3_2.catalina.bottle.tar.gz
🍺  /usr/local/Cellar/wget/1.20.3_2: 50 files, 4.0MB
==> Caveats
==> [email protected]
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
  /usr/local/etc/[email protected]/certs

and run
  /usr/local/opt/[email protected]/bin/c_rehash

[email protected] is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.

If you need to have [email protected] first in your PATH run:
  echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc

For compilers to find [email protected] you may need to set:
  export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
  export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

出現這樣就算成功了
在這裏插入圖片描述速度還是很快的

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章