memo.xight.org

日々のメモ

brew update で syntax error

Summary

brew update で syntax errorが発生。
brew doctor を実行しても同様のエラー。

$ brew update
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
unable to refresh index
/usr/local/Homebrew/Library/Homebrew/load_path.rb:9:in `require': /usr/local/Homebrew/Library/Homebrew/vendor/bundle/bundler/setup.rb:47: syntax error, unexpected <<, expecting end-of-input (SyntaxError)
<<<<<<< HEAD
  ^
        from /usr/local/Homebrew/Library/Homebrew/load_path.rb:9:in `<top (required)>'
        from /usr/local/Homebrew/Library/Homebrew/global.rb:10:in `require_relative'
        from /usr/local/Homebrew/Library/Homebrew/global.rb:10:in `<top (required)>'
        from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
        from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'

対処: brew update-reset

$ brew update-reset
==> Fetching /usr/local/Homebrew...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 5 (delta 4), reused 3 (delta 2), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/Homebrew/brew
 * [new branch]          dependabot/bundler/Library/Homebrew/rubocop-performance-1.3.0 -> origin/dependabot/bundler/Libr
ary/Homebrew/rubocop-performance-1.3.0

==> Resetting /usr/local/Homebrew...
Branch 'master' set up to track remote branch 'master' from 'origin'.
Switched to and reset branch 'master'
Your branch is up to date with 'origin/master'.

Reference

Homebrew Community Discussion - 2019-03-04 - Brew ruby load error
https://discourse.brew.sh/t/brew-ruby-load-error/4309/4

Stack overflow - 2019-03-03 - Homebrew broken - "cannot load such file — vendor/bundle/bundler/setup (LoadError)"
https://stackoverflow.com/questions/54848319/homebrew-broken-cannot-load-such-file-vendor-bundle-bundler-setup-loaderr

SPTAG - A library for fast approximate nearest neighbor search

Summary

A distributed approximate nearest neighborhood search (ANN) library which provides a high quality vector index build, search and distributed online serving toolkits for large scale vector search scenario.


Reference

github.com - Microsoft - SPTAG
https://github.com/microsoft/SPTAG

via

TechCrunch Japan - 2019-05-16 - マイクロソフトがBing検索の重要アルゴリズムをオープンソース化
https://jp.techcrunch.com/2019/05/16/2019-05-15-microsoft-open-sources-a-crucial-algorithm-behind-its-bing-search-services/

macOS Mojave + homebrew + MacTeX (TeXLive2019)

Summary

macOS 10.14 Mojave で TeX 環境 (TeXLive2019) の構築。

homebrew, brewcask で ghostscript, imagemagick, mactex をインストール

$ brew install ghostscript imagemagick
$ brew cask install mactex
$ sudo chown -R USERNAME:admin /usr/local/texlive

mactexをアップデート

$ tlmgr update --self --all

tlmgr: The TeX Live versions supported by the repository
http://ftp.jaist.ac.jp/pub/CTAN/systems/texlive/tlnet
  (2016--2018)
do not include the version of the local installation
  (2019).

ミラーのリポジトリが2019に対応していなかったので、本家のリポジトリを参照

$ tlmgr option repository "ftp://ftp.tug.org/texlive/tlnet"
tlmgr: setting default package repository to ftp://ftp.tug.org/texlive/tlnet

ミラーのリポジトリを指定

$ tlmgr option repository "http://mirror.ctan.org/systems/texlive/tlnet"
tlmgr: setting default package repository to http://mirror.ctan.org/systems/texlive/tlnet