BREW

设计模式 - 模板方法

蓝咒 提交于 2020-02-01 19:51:49
模板方法(Template Method) Intent 定义算法框架,并将一些步骤的实现延迟到子类。 通过模板方法,子类可以重新定义算法的某些步骤,而不用改变算法的结构。 Class Diagram Implementation 冲咖啡和冲茶都有类似的流程,但是某些步骤会有点不一样,要求复用那些相同步骤的代码。 public abstract class CaffeineBeverage { final void prepareRecipe ( ) { boilWater ( ) ; brew ( ) ; pourInCup ( ) ; addCondiments ( ) ; } abstract void brew ( ) ; abstract void addCondiments ( ) ; void boilWater ( ) { System . out . println ( "boilWater" ) ; } void pourInCup ( ) { System . out . println ( "pourInCup" ) ; } } public class Coffee extends CaffeineBeverage { @Override void brew ( ) { System . out . println ( "Coffee.brew" ) ;

使用brew install *****报错无指定文件夹写入权限的解决办法

时光怂恿深爱的人放手 提交于 2020-02-01 14:16:55
当遇到以下错误时 brew install watchman Error: The following directories are not writable by your user: /usr/local/share/man/man8 You should change the ownership of these directories to your user. sudo chown -R $(whoami) /usr/local/share/man/man8 其实报错信息中已经给出提示了,先sudo chown -R $(whoami) /usr/local/*,然后在brew install ******** 就好啦 来源: CSDN 作者: Just Demo 链接: https://blog.csdn.net/qq_42199786/article/details/104130368

Mac Homebrew指南及其出错分析

落爺英雄遲暮 提交于 2020-01-29 18:15:00
Mac Homebrew指南 安装: 出错分析: 问题描述 解决办法 常用命令: 安装: 在终端输入命令 /usr/bin/ruby -e " $( curl -fsSL https:// raw.githubusercontent.com/Homebrew/install/master/install ) " 如果遇到警告 /usr/local/bin is not in your PATH . 解决办法: 在Linux操作系统下,配置环境变量是使用如下命令: vim /etc/profile 在OSX下,我们用如下命令打开环境变量配置文件: open ~/.bash_profile 添加: export PATH=/usr/local/bin:$PATH source ~/.bash_profile 更新配置后的环境变量 出错分析: 问题描述 安装brew时遇到了如下错误: curl: ( 7 ) Failed to connect to raw.githubusercontent.com port 443: Connection refused 解决办法 使用Chrome或者Safari打开如下链接 https://raw.githubusercontent.com/Homebrew/install/master/install 按下快捷键Commond

Mac安装brew及问题解决

强颜欢笑 提交于 2020-01-26 04:39:52
1、打开终端、命令行执行: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 官方地址: https://brew.sh/index_zh-cn 2、顺利情况下 3 问题 error: RPC failed; curl 18 transfer closed with outstanding read data remaining fatal: the remote end hung up unexpectedly fatal: early EOF fatal: index-pack failed Error: Failure while executing; `git clone https://github.com/Homebrew/homebrew-core /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1` exited with 128. Error: Failure while executing; `/usr/local/bin/brew tap homebrew/core` exited with 1. Failed during: /usr

macos brew 使用ali镜像

 ̄綄美尐妖づ 提交于 2020-01-24 22:23:14
平时我们执行 brew 命令安装软件的时候,跟以下 3 个仓库地址有关: brew.git homebrew-core.git homebrew-bottles 通过以下操作将这 3 个仓库地址全部替换为 Alibaba 提供的地址 1. 替换 / 还原 brew.git 仓库地址 替换成阿里巴巴的 brew.git 仓库地址: cd "$(brew --repo)" git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git 还原为官方提供的 brew.git 仓库地址 cd"$(brew --repo)" git remote set-url origin https://github.com/Homebrew/brew.git 2. 替换 / 还原 homebrew-core.git 仓库地址 替换成阿里巴巴的 homebrew-core.git 仓库地址: cd"$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git 还原为官方提供的 homebrew-core.git 仓库地址 cd"$

Mac使用brew找不到php7.1

扶醉桌前 提交于 2020-01-23 22:49:11
首先通过 brew search php 查看是否能找到对对应的php版本,eg: 表示目前可安装的php版本只有php php@7.2 php@7.3 也就是说没有我想安装的php7.1版本或者更老的php版本。 通过命令 brew tap exolnet/homebrew-deprecated 可以将老的或者已经遗弃的php版本找回来。 安装完之后继续使用 brew search php 发现 老版本的php回来了 再通过 brew install exolnet/deprecated/php@7.1 来安装对应的php版本即可 来源: CSDN 作者: weixin_44253824 链接: https://blog.csdn.net/weixin_44253824/article/details/104078107

mongodb 安装不上

纵饮孤独 提交于 2020-01-23 20:39:48
1.mongodb 安装不上 brew install mongodb Error: No available formula with the name "mongodb" ==> 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... 提示这个错误 2.通过brew search mongodb可以查看安装包 brew search mongodb ==> Casks gcollazo-mongodb mongodb-compass mongodb-compass-community

Mac下安装brew及使用

非 Y 不嫁゛ 提交于 2020-01-22 21:28:22
brew : 终端程序管理工具 能让你更快速的安装你想要的工具。而不用考虑大量的依赖。 安装命令 给官网的一样也可以自己去官网查看 它就类似于centos下的yum 和 Ubuntu下的apt-get 可以轻松的管理你所需要的软件,而不用过多的关注依赖内容 安装: / usr / bin / ruby - e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 复制以上到终端 简单记录下brew的基本使用吧,命令查找可以参考 brew官方文档 查看已经安装的软件包 brew list 2.安装软件包 brew install 软件包名称 3.卸载软件包 brew uninstall 软件包名 4.主要查看具体的信息及依赖关系当前版本注意事项等 brew info 软件包名 更新版本 brew update 6.软件升级 brew upgrade 升级所有 当然也可以指定升级 brew upgrade xxx指定的升级的程序名 7.清理不需要的版本及其安装缓存 brew cleanup 8.检查系统是否存在潜在问题 brew doctor 9.查看系统通过 brew 安装的服务 brew services list 10.重启PHP-fpm服务 brew services

执行ideviceinstaller -l报错Could not connect to lockdownd. Exiting.

被刻印的时光 ゝ 提交于 2020-01-19 00:33:52
执行命令 ideviceinstaller -l 报错: Could not connect to lockdownd. Exiting. 尝试以下命令重新编译库 1 brew uninstall -f libimobiledevice ideviceinstaller usbmuxd 如果失败执行: brew uninstall --ignore-dependencies libimobiledevice ideviceinstaller usbmuxd 2 brew install -v --HEAD --fetch --build-from-source usbmuxd libimobiledevice ideviceinstaller 参考:https://www.e-learn.cn/content/qita/2023277 来源: CSDN 作者: 404青年 链接: https://blog.csdn.net/suzhiyu521/article/details/104028148

mac OWLVis安装

我只是一个虾纸丫 提交于 2020-01-17 01:35:32
OWLVis介绍 如果我们需要管理类似KG知识图谱的东西,可以使用protege。这款斯坦福共享的软件非常棒。也有网页版:webpretege.stanford.edu. 但是我们需要观察更细致的树形结构: 如何安装 但是安装之后仍然遇到: dot的问题 /usr/local/bin/dot no such file问题。 那么我们需要安装dot。 brew install GraphVis 如果安装失败了怎么办? 如果遇到xcode missing问题: xcode-select --install 遇到问题比如meson问题解决方法: brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/meson.rb 如果发现这样安装比较啰嗦可以采用方案二: 步骤一: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null ; brew install caskroom/cask/brew-cask 2> /dev/null 步骤二: brew cask install graphviz 最后的效果 总结