Я недавно обновился до MacOS Mojave 10.14.1, и при использовании нативной Terminal
или iTerm
команда vim
оказалась неработоспособной. Ошибка будет выглядеть как
dudeOnMac:~ freddy$ vim file
dyld: Library not loaded: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib
Referenced from: /usr/local/bin/vim
Reason: image not found
Я нашел этот пост SuperUser , который не совсем решил проблему. Другие несколько предложений были переустановить Vim с нуля с базы. Итак, я сделал
brew update
brew upgrade vim
но осталось со следующей ошибкой
==> Upgrading vim
Error: The following formula
[#<Dependency: "python" []>, #<Options: []>]
cannot be installed as binary package and must be built from source.
Install the Command Line Tools:
xcode-select --install
Таким образом, я вошел и сделал установку xcode
, как предложено выше, но теперь ушел с новой ошибкой, как
Error: An unexpected error occurred during the `brew link` step
The formula built, but is not symlinked into /usr/local
pathname contains null byte
Error: pathname contains null byte
Please report this bug:
https://docs.brew.sh/Troubleshooting
/usr/local/Homebrew/Library/Homebrew/extend/pathname.rb:265:in `initialize'
/usr/local/Homebrew/Library/Homebrew/extend/pathname.rb:265:in `readlink'
/usr/local/Homebrew/Library/Homebrew/extend/pathname.rb:265:in `resolved_path'
/usr/local/Homebrew/Library/Homebrew/keg.rb:422:in `block in oldname_opt_record'
/usr/local/Homebrew/Library/Homebrew/keg.rb:421:in `each'
/usr/local/Homebrew/Library/Homebrew/keg.rb:421:in `find'
/usr/local/Homebrew/Library/Homebrew/keg.rb:421:in `oldname_opt_record'
/usr/local/Homebrew/Library/Homebrew/keg.rb:535:in `optlink'
/usr/local/Homebrew/Library/Homebrew/keg.rb:432:in `link'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:801:in `link'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:619:in `finish'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:586:in `install_dependency'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:539:in `block in install_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:539:in `each'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:539:in `install_dependencies'
/usr/local/Homebrew/Library/Homebrew/formula_installer.rb:252:in `install'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:187:in `upgrade_formula'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:136:in `block in upgrade_formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:133:in `each'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:133:in `upgrade_formulae'
/usr/local/Homebrew/Library/Homebrew/cmd/upgrade.rb:111:in `upgrade'
/usr/local/Homebrew/Library/Homebrew/brew.rb:102:in `<main>'