6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

El capitan の Homebrew で vim が入らない

Posted at

Mac の Vim でクリップボードの連携が効かないとき, ビルド時のオプションが抜けているのが問題なので, /usr/bin/vim ではなく, Homebrew を使ってビルドした Vim に切り替えることで解決しようという記事があったので,brew install vimしてみるも,うまくいかない.

$ brew install vim
Warning: You are using OS X 10.11.
We do not provide support for this pre-release version.
You may encounter build failures or other breakage.
==> Downloading https://mirrors.kernel.org/debian/pool/main/v/vim/vim_7.4.712.orig.tar.gz

curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "vim"
Download failed: https://mirrors.kernel.org/debian/pool/main/v/vim/vim_7.4.712.orig.tar.gz

書いてあるようにサポート外でビルドが通らないとかならまだしも,親に向かって The requested URL returned error: 404 Not Found とはなんだ,となる.

実際 404 Not Found なのが原因ではなかった.後輩に聞くと,こういうときはとりあえず brew doctor するらしい.

$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!

Warning: The /usr/local is not writable.

You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami) /usr/local

...

El Capitan だと,/usr/local が自由にできなくなったとかで,権限を与えてやる必要があるらしい.言われるがままに sudo chown -R $(whoami) /usr/local (そのままコピペしてOK) すると,できるようになった.

$ brew install vim
==> Downloading https://github.com/vim/vim/archive/v7.4.922.tar.gz
==> Downloading from https://codeload.github.com/vim/vim/tar.gz/v7.4.922
######################################################################## 100.0%
==> ./configure --prefix=/usr/local --mandir=/usr/local/Cellar/vim/7.4.922/share/man --enable-multibyte --with-tlib=ncurses --enable-cscope --with-features=huge --with-compiledby=Homebrew --enable-perlinterp --enable-pythoninterp --enable
==> make
==> make install prefix=/usr/local/Cellar/vim/7.4.922 STRIP=true
🍺  /usr/local/Cellar/vim/7.4.922: 1620 files, 26M, built in 48 seconds

(おそらくアーカイブを保存するのも /usr/local 以下なのでダウンロードできなかった,みたいな理由だと思ったのだが,何故かしれっとダウンロード元も変わっているのは謎)

6
7
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
7

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?