【发布时间】:2021-08-20 03:05:19
【问题描述】:
我已经像大多数教程一样将其写入终端:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
然后终端返回这个:
Failed to connect to raw.githubusercontent.com port 443: Connection refused
然后我尝试这样做:
export https_proxy=http://127.0.0.1:8090 http_proxy=http://127.0.0.1:8090 all_proxy=socks5://127.0.0.1:809
最后一个错误没有再次出现,但终端返回 this:curl:
curl: (56) Received HTTP code 302 from proxy after CONNECT
当我输入 brew -v 时,终端会这样说
Homebrew 3.2.0
Homebrew/homebrew-core (no Git repository)
Homebrew/homebrew-cask (git revision f2ce12c029; last commit 2021-07-02)
而brew install 仍然不起作用
例如我尝试安装 php,它返回:
fatal: unable to access 'https://github.com/Homebrew/homebrew-core/': Received HTTP code 302 from proxy after CONNECT
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "php".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Warning: Error searching on GitHub: curl failed! % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (56) Received HTTP code 302 from proxy after CONNECT
Error: No formulae found in taps.
有人知道如何解决这个问题吗?谢谢??????
【问题讨论】: