在Mac下安装XVim2(笔记)

一、环境:

macOS Mojave 10.14.4

Xcode 10.2.1 

二、安装步骤:

确认xcode的路径是否正确

xcode-select -p

如果出现/Applications/Xcode.app/Contents/Developer就证明没问题,否则就需要设置xcode路径

xcode-select -s /Applications/Xcode.app/Contents/Developer

1.打开Keychain Access ——>Keychain Access——>Certificate Assistant——>Create a certificate

Name可以随意修改,但其他不变。

2.对Xcode进行签名

sudo codesign -f -s XcodeSigner /Applications/Xcode.app

tip:签名过程很漫长,我大概等了十几分钟。在此期间不要cd到Xvim2目录下并执行make命令,不然打开Xcode不会加载该插件。

如果执行了make,那么执行 make uninstall 这个命令进行卸载,等到签名完成才可以执行make命令。

3.安装Xvim2

cd ~
git clone https://github.com/XVimProject/XVim2.git
cd ./XVim2
make

直到Build Succeeded,表示安装成功,打开Xcode会弹出一个窗口,点击Load Bundle

4.卸载Xvim2

make uninstall

5.可能出现的问题解决方案

问题

ld: malformed file
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd:4:18: error: unknown enumerated scalar
platform: zippered
^~~~~~~~
file ‘/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/lib/libSystem.tbd’
clang: error: linker command failed with exit code 1 (use -v to see invocation)

问题原因

mac系统当中的xcode版本太老

解决方法

将xcode升级到10或更高

貌似还有一个问题,SWIFT_VERSION什么的。网上也找不到答案,但是将xcode换成10.x版本就没有出现这个问题了。

猜你喜欢

转载自blog.csdn.net/u011046452/article/details/89789504