参考:
...为了在macOS上安装 emacs, 我按照emacs官网提供的教程, 即运行 brew install --cask emacs
, 运行之后报错了。我是如何解决这个问题的呢?
我首先为了更新 brew, 则需要采用非 shallow 的方式安装 homebrew-core, 那么可以用log输出的提示安装, 如:
git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
然后, 我再运行 brew update --verbose
, 这样, 我就更新了 homebrew 的 formula.
上面的 brew 更新好了以后, 我就可以利用 homebrew cask 来安装 emacs 了, 直接执行 brew install --cask emacs
, 则会先利用 homebrew 安装 cask, 然后再安装 emacs.
为了解决上面的问题, 我特意上网搜索了一番, 搜索的关键字是前面命令运行出错的日志输出. 如
...Error: Invalid cask
Cask is
git checkout 分支名 报错? fatal: 'ssr' could be both a local file and a tracking branch. 如何解决?
# git checkout ssr
fatal: 'ssr' could be both a local file and a tracking branch.
Please use -- (and optionally --no-guess) to disambiguate
是否用 git checkout origin/ssr
? 并不赞成. 因为这是一个远程分支.
那么怎么办呢? 答: 用 switch
Nginx 的配置中有一个指令 map
可用于定义变量及其取值, 根据这个定义的变量可以动态的配置静态站点的目录.
用户访问 v1.dev.example.com 和 v2.dev.example.com 分别得到 /var/www/html/v1 和 /var/www/html/v2 的目录 中的静态资源.
Syntax: map string $variable { … }
Default: —
Context: http
Code
map $http_host $name {
hostnames;
default 0;
example.com 1;
*.example.com 1;
example.org 2;
*.example.org 2;
.example.net 3;
wap
...