本文介绍: 又叫 Homebrew,是 Mac OSX上的软件包管理工具。类似 ubuntu 中的apt-get。如下1、 遇到这个报错不知道原来为何有一个etc文件。估计是 redis 相关的。复制成了其他名称然后删除了。重新跑。2、 第二个问题我的解决方式, 删除2个文件夹重新运行没有错,又报错了。。。心累。因为此时的brew命令已经是有效的了,我想直接卸载再重装。或者先用着再说。删除后重新安装。OKay使用可查看 此命令使用方式。
Brew
brew 又叫 Homebrew,是 Mac OSX上的软件包管理工具。类似 ubuntu 中的 apt-get
。
- Install
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
如下
houbinbindeMacBook-Pro:tools houbinbin$ /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
==> The following existing directories will be made group writable:
/usr/local/bin
/usr/local/etc
/usr/local/lib
/usr/local/share
/usr/local/share/doc
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man3
/usr/local/share/man/man5
/usr/local/share/man/man7
==> The following existing directories will have their owner set to houbinbin:
/usr/local/bin
/usr/local/lib
/usr/local/share
/usr/local/share/doc
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man3
/usr/local/share/man/man5
/usr/local/share/man/man7
==> The following existing directories will have their group set to admin:
/usr/local/bin
/usr/local/lib
/usr/local/share
/usr/local/share/doc
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man3
/usr/local/share/man/man5
/usr/local/share/man/man7
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/etc
/usr/local/opt
/usr/local/sbin
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin /usr/local/etc /usr/local/lib /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin /usr/local/etc /usr/local/lib /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7
==> /usr/bin/sudo /usr/sbin/chown houbinbin /usr/local/bin /usr/local/lib /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/lib /usr/local/share /usr/local/share/doc /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man3 /usr/local/share/man/man5 /usr/local/share/man/man7
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
mkdir: /usr/local/etc: Not a directory
Failed during: /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
1、 遇到这个报错
mkdir: /usr/local/etc: Not a directory
不知道原来为何有一个 etc
文件。估计是 redis 相关的。复制成了其他名称然后删除了。重新跑。
2、 第二个问题
/usr/local/Homebrew/.git: Permission denied
Failed during: git init -q
我的解决方式, 删除2个文件夹
sudo rm -rf /usr/local/Cellar
sudo rm -rf /usr/local/Homebrew
重新运行
houbinbindeMacBook-Pro:local houbinbin$ /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
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown houbinbin /usr/local/Cellar /usr/local/Homebrew
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 5292, done.
remote: Compressing objects: 100% (3328/3328), done.
remote: Total 5292 (delta 2877), reused 3505 (delta 1791), pack-reused 0
Receiving objects: 100% (5292/5292), 2.78 MiB | 82.00 KiB/s, done.
Resolving deltas: 100% (2877/2877), done.
From https://github.com/Homebrew/brew
* [new branch] master -> origin/master
* ...
HEAD is now at fa34aa2 Merge pull request #2232 from reitermarkus/spec-mktmpdir
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4165, done.
remote: Compressing objects: 100% (4018/4018), done.
remote: Total 4165 (delta 32), reused 434 (delta 10), pack-reused 0
Receiving objects: 100% (4165/4165), 3.31 MiB | 62.00 KiB/s, done.
Resolving deltas: 100% (32/32), done.
Checking connectivity... done.
Tapped 4016 formulae (4,196 files, 10.4M)
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/houbinbin/Library/Caches/Homebrew...
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
Error: Failed to link all completions, docs and manpages:
Permission denied - (../../../Homebrew/completions/zsh/_brew, /usr/local/share/zsh/site-functions/_brew)
Failed during: /usr/local/bin/brew update --force
没有错,又报错了。。。心累。因为此时的 brew
命令已经是有效的了,我想直接卸载再重装。或者先用着再说。
- Un-install
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
删除后重新安装。OKay
- Usage
houbinbindeMacBook-Pro:local houbinbin$ brew install tree
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/tree-1.7.0.el_capitan.bottle.1.tar.gz
######################################################################## 100.0%
curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume.
==> Trying a full download
######################################################################## 100.0%
==> Pouring tree-1.7.0.el_capitan.bottle.1.tar.gz
🍺 /usr/local/Cellar/tree/1.7.0: 7 files, 113.3K
使用 tree --help
可查看 此命令使用方式。
端口占用
命令 lsof -i tcp:port
(port替换成端口号,比如6379)可以查看该端口被什么程序占用,并显示PID,方便KILL
目录直达
CMD+SHIF+G
or
命令行打开指定路径,然后 open .
原文地址:https://blog.csdn.net/ryo1060732496/article/details/135990577
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_65869.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。