使用Git进行Brew更新错误

时间:2014-08-23 18:05:17

标签: git homebrew

我遇到了同时运行rvm use ruby --install --defaultbrew update的问题。似乎后一个问题是我看到第一个问题的原因。

以下是rvm use ruby --install --default的错误:

ruby-2.1.2 is not installed - installing.
Searching for binary rubies, this might take some time.

Found remote file https://rvm.io/binaries/osx/10.9/x86_64/ruby-2.1.2.tar.bz2
Checking requirements for osx.
Installing requirements for osx.
Updating system......
Error running 'requirements_osx_brew_update_system ruby-2.1.2',
showing last 15 lines of /Users/connorphillips/.rvm/log/1408816616_ruby-2.1.2/update_system.log
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.'
++ rvm_pretty_print stderr
++ case "${rvm_pretty_print_flag:=auto}" in
++ case "${TERM:-dumb}" in
++ case "$1" in
++ [[ -t 2 ]]
++ return 1
++ printf %b 'Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.\n'
Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
++ return 1
Requirements installation failed with status: 1.
Gemset '' does not exist, 'rvm ruby-2.1.2 do rvm gemset create ' first, or append '--create'.

然后我尝试brew update这就是我看到的错误:

fatal: unable to access 'https://github.com/Homebrew/homebrew.git/': Could not resolve host: github.com
Error: Failure while executing: git pull -q origin refs/heads/master:refs/remotes/origin/master

问题的根源是什么/修复它。

2 个答案:

答案 0 :(得分:2)

我有类似的问题,但能够解决它。每当我尝试运行brew更新时,我都会收到此错误:

  

致命:无法访问“https://github.com/Homebrew/homebrew.git/”:无法解析主机:github.com
  错误:执行时失败:git pull --quiet origin refs / heads / master:refs / remotes / origin / master

我的问题是我使用的是VPN,但在关闭它后,它对我有效。

答案 1 :(得分:2)

这可能是Git的一个问题。只是尝试在终端上执行此操作:

git config --global --unset http.proxy 

git config --global --unset https.proxy 

然后重新启动终端或打开一个新终端。然后再次尝试brew更新。