执行命令:
brew install php71
错误信息 error:
invalid attribute for formula 'homebrew/php/php56': version(nil)
Error: Cannot tap homebrew/php: invalid syntax in tap!
解决方案详细执行过程:
➜bin /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> Downloading and installing Homebrew...
error: packfile .git/objects/pack/pack-f7bc9a285745d77092e4127587a9c55f45c532e6.pack does not match index
remote: Counting objects: 95607,done.
remote: Compressing objects: 100%(23/23),done.
error: packfile .git/objects/pack/pack-f7bc9a285745d77092e4127587a9c55f45c532e6.pack does not match index
........ 次数省略无数字 ........
Resolving deltas: 100%(69411/69411),done.
From https://github.com/Homebrew/brew
*[new branch]master-> origin/master
*[new tag]0.1-> 0.1
*[new tag]0.2-> 0.2
*[new tag]0.3-> 0.3
*[new tag]0.4-> 0.4
*[new tag]0.5-> 0.5
*[new tag]0.6-> 0.6
*[new tag]0.7-> 0.7
*[new tag]0.7.1-> 0.7.1
*[new tag]0.8-> 0.8
*[new tag]0.8.1-> 0.8.1
*[new tag]0.9-> 0.9
*[new tag]0.9.1-> 0.9.1
*[new tag]0.9.2-> 0.9.2
*[new tag]0.9.3-> 0.9.3
*[new tag]0.9.4-> 0.9.4
*[new tag]0.9.5-> 0.9.5
*[new tag]0.9.8-> 0.9.8
*[new tag]0.9.9-> 0.9.9
*[new tag]1.0.0-> 1.0.0
*[new tag]1.0.1-> 1.0.1
*[new tag]1.0.2-> 1.0.2
*[new tag]1.0.3-> 1.0.3
*[new tag]1.0.4-> 1.0.4
*[new tag]1.0.5-> 1.0.5
*[new tag]1.0.6-> 1.0.6
*[new tag]1.0.7-> 1.0.7
*[new tag]1.0.8-> 1.0.8
*[new tag]1.0.9-> 1.0.9
*[new tag]1.1.0-> 1.1.0
*[new tag]1.1.1-> 1.1.1
*[new tag]1.1.10-> 1.1.10
*[new tag]1.1.11-> 1.1.11
*[new tag]1.1.12-> 1.1.12
*[new tag]1.1.13-> 1.1.13
*[new tag]1.1.2-> 1.1.2
*[new tag]1.1.3-> 1.1.3
*[new tag]1.1.4-> 1.1.4
*[new tag]1.1.5-> 1.1.5
*[new tag]1.1.6-> 1.1.6
*[new tag]1.1.7-> 1.1.7
*[new tag]1.1.8-> 1.1.8
*[new tag]1.1.9-> 1.1.9
*[new tag]1.2.0-> 1.2.0
*[new tag]1.2.1-> 1.2.1
*[new tag]1.2.2-> 1.2.2
*[new tag]1.2.3-> 1.2.3
*[new tag]1.2.4-> 1.2.4
*[new tag]1.2.5-> 1.2.5
*[new tag]1.2.6-> 1.2.6
*[new tag]1.3.0-> 1.3.0
*[new tag]1.3.1-> 1.3.1
*[new tag]1.3.2-> 1.3.2
*[new tag]1.3.3-> 1.3.3
*[new tag]1.3.4-> 1.3.4
*[new tag]1.3.5-> 1.3.5
*[new tag]1.3.6-> 1.3.6
*[new tag]1.3.7-> 1.3.7
*[new tag]1.3.8-> 1.3.8
*[new tag]1.3.9-> 1.3.9
*[new tag]1.4.0-> 1.4.0
HEAD is now at 9a0981e Merge pull request #3566 from sjackman/path
==> Downloading https://homebrew.bintray.com/bottles-portable/portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
######################################################################## 100.0%
==> Pouring portable-ruby-2.3.3.leopard_64.bottle.1.tar.gz
==>Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4659,done.
remote: Compressing objects: 100%(4437/4437),done.
remote: Total 4659(delta 36),reused 319(delta 10),pack-reused 0
Receiving objects: 100%(4659/4659),3.84 MiB | 571.00 KiB/s,done.
Resolving deltas: 100%(36/36),done.
Tapped 4431 formulae(4,706 files,12.0MB)
==>Cleaning up /Library/Caches/Homebrew...
==>Migrating /Library/Caches/Homebrew to /Users/zhizhou/Library/Caches/Homebrew...
==>Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!
==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation(and how to opt-out)here:
https://docs.brew.sh/Analytics.html
==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh
➜bin
至此Homebrew更新完毕,over。
网友评论