我在自制的Cellar
文件夹中安装了4个版本的macvim。我希望最新版本只是我的默认vim无处不在,即当我从命令行输入gvim
或vim
时。
brew linkapps macvim
不起作用,即gvim
仍然提供"没有这样的文件"跑完之后。
这是当前的信息:
$ brew info macvim
macvim: stable 7.4-85, HEAD
GUI for vim, made for OS X
https://github.com/macvim-dev/macvim
/usr/local/Cellar/macvim/7.4-72 (1799 files, 28M)
Built from source
/usr/local/Cellar/macvim/7.4-73 (1810 files, 28M)
Built from source
/usr/local/Cellar/macvim/7.4-73_1 (1810 files, 28M)
Built from source
/usr/local/Cellar/macvim/7.4-85 (1910 files, 35M)
Built from source with: --with-lua --with-luajit --with-python3 --with-override-system-vim
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/macvim.rb
==> Dependencies
Recommended: cscope ✔
Optional: lua ✔, luajit ✔
==> Options
--with-custom-icons
Try to generate custom document icons
--with-lua
Build with lua support
--with-luajit
Build with luajit support
--with-override-system-vim
Override system vim
--with-python3
Build with python3 support
--without-cscope
Build without cscope support
--without-python
Build without python support
--HEAD
Install HEAD version
==> Caveats
.app bundles were installed.
Run `brew linkapps macvim` to symlink these to /Applications.
当我运行brew doctor
时,相关消息为:
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
macvim
vim
然而,当我brew link macvim
时,它会链接到以前版本的macvim,而不是最新版本。
答案 0 :(得分:1)
请运行brew prune
以删除损坏的链接。 brew doctor
也可以帮助您找到其他问题。