BREW

Mac安装和配置默认Python版本

北战南征 提交于 2019-12-03 11:19:41
Mac默认安装了Python2.7 , 查看python版本: python -V 查看python可执行文件路径: which python 安装homebrew /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 安装python3 brew install python3 查看python3可执行文件路径: which python3 查看python3版本: 查看python path: python import sys sys.path (可以看到我的python 2 被自动安装到:/System/Library/Frameworks/Python.framework/Versions/2.7 ) exit() 查看python3 path: python3 import sys sys.path (可以看到我的python 3 被homebrew自动安装到:/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7 ) exit 配置全局环境变量: 我把所有变量都放到全局环境变量文件/etc/profile中了

解决 invalid 'depends_on macos'

有些话、适合烂在心里 提交于 2019-12-03 09:17:00
问题: ~ brew cask uninstall macdown Error: Cask 'macdown' definition is invalid: invalid 'depends_on macos' value: ":mountain_lion" 解决: /usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -pe 's/depends_on macos: \[.*?\]//gsm;s/depends_on macos: .*//g' 参考: https://github.com/Homebrew/homebrew-cask/issues/58046 来源: oschina 链接: https://my.oschina.net/u/2276973/blog/3074120

brew or pip - install credstash - errors - No named formulae found in taps / OSErr six-1.4.1-py2.7.egg-info operation not permitted

匿名 (未验证) 提交于 2019-12-03 08:59:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Getting the following error on my Mac Terminal window. $ pip --version pip 6.1.1 from /Library/Python/2.7/site-packages (python 2.7) Python version is 2.7.10 While trying to install credstash using brew, I'm getting the following error. $ `which python` --version && brew update && brew install credstash Python 2.7.10 Already up-to-date. Error: No available formula with the name "credstash" ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps. Got the

Laravel valet not working

匿名 (未验证) 提交于 2019-12-03 08:48:34
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I use OSX El Capitan and PHP 7. I followed the installation guide so I install Laravel Valet version v1.1.3 successfully. I ping foo.dev or any.dev then the terminal prints "64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.116 ms" Everything is ok. My directory /User/mickey/Sites is added to Valet's paths. I created a Laravel 5.2 project named blog, then run the project with php artisan serve ok but when i accessed url blog.dev on the browser, the browser said This site can’t be reached, blog.dev refused to connect. ERR_CONNECTION_REFUSED.

How to update Ruby Version 2.0.0 to the latest version in Mac OSX Yosemite?

匿名 (未验证) 提交于 2019-12-03 07:47:04
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I need to update my ruby version from 2.0.0 to the latest version, I can not use some gems because my version is not updated. I had used Homebrew to install Ruby some time ago, How can i update my Ruby version? 回答1: Open your terminal and run \curl -sSL https://get.rvm.io | bash -s stable When this is complete, you need to restart your terminal for the rvm to work. Now, run rvm list known This shows the list of versions of the ruby. Now, run rvm install ruby-2.4.2 If you type ruby -v in the terminal, you should see ruby 2.4.2 . If it still

Install intl PHP extension OSX High Sierra

匿名 (未验证) 提交于 2019-12-03 07:36:14
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: How can I install intl PHP extension in PHP 7.1.7, which is delivered with osx high sierra? 回答1: open a terminal then type: brew search intl you should be able to see php71-intl, then run brew install homebrew/php/php71-intl then restart apache sudo apachectl restart then type: php -i | grep intl you should be able to see something like this: Additional .ini files parsed => /usr/local/etc/php/7.1/conf.d/ext-intl.ini intl intl.default_locale => no value => no value intl.error_level => 0 => 0 intl.use_exceptions => 0 => 0 Enjoy! 回答2: In

MacOS上使用Openconnect代替Cisco Anyconnect

拟墨画扇 提交于 2019-12-03 07:04:33
OpenConnect是一个Cisco Anyconnect的替代品,具有开源、易获取、可靠等优点。而官方版本的Cisco Anyconnect配置较为繁琐,需要在管理界面同时部署多平台客户端才能支持多平台。相比之下OpenConnect在这点就具有优势,可以在官方版本无法跨平台时替代使用。 命令行模式: brew install openconnect GUI模式: brew cask install openconnect-gui 参考链接: 使用openconnect代替cisco anyconnect 来源: https://www.cnblogs.com/jerryqi/p/11782278.html

mac install azure-cli

喜你入骨 提交于 2019-12-03 06:49:26
安装 CLI 时,可以先更新 brew 存储库信息,然后运行 install 命令: brew update && brew install azure-cli 更新: brew update && brew upgrade azure-cli 卸载: brew uninstall azure-cli 来源: https://www.cnblogs.com/jerryqi/p/11781276.html

ansible 解密 加密 文件

断了今生、忘了曾经 提交于 2019-12-03 03:27:23
mac用户可以通过brew命令安装: brew install ansible 首先把密码存在一个固定的文件里,比如 ~/.vault_pass.txt ,方便使用。 如果一个配置文件variables.yml 的内容已经用ansible加密了,如何解密: ansible-vault decrypt --vault-password-file ~/.vault_pass.txt variables.yml 如何加密一个文件: ansible-vault encrypt --vault-password-file ~/.vault_pass.txt variables.yml /*--> */ /*--> */ 来源: https://www.cnblogs.com/iwangzheng/p/11774902.html

Installing OpenMP on Mac OS X 10.11

匿名 (未验证) 提交于 2019-12-03 03:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: How can I get OpenMP to run on Mac OSX 10.11, so that I can execute scripts via terminal ? I have installed OpenMP: brew install clang-omp . When I run, for example: gcc -fopenmp -o Parallel.b Parallel.c the following expression returns: fatal error: 'omp.h' file not found I have also tried: brew install gcc --without-multilib but unfortunately this eventually returned the following (after first installing some dependencies): The requested URL returned error : 404 Not Found Error : Failed to download resource "mpfr--patch" Any