问题描述:本想在自己本机Mac 上安装下redis 集群,不料在编译make 下触发了以下异常
unsupported tapi file type ‘!tapi-tbd’ in YAML file ‘/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd’ for architecture x86_64
/bin/sh: pkg-config: command not found
LINK redis-server
ld: unsupported tapi file type '!tapi-tbd' in YAML file '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/libSystem.tbd' for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [redis-server] Error 1
make: *** [test] Error 2
在stackoverflow上找到了蛛丝马迹,下载了:Command_Line_Tools_for_Xcode_11.5.dmg
百度网盘地址:https://pan.baidu.com/s/10mJUR7LXwRkhvTboFpIu5A,
提取码:whn9
步骤:
1、 sudo rm -rf /Library/Developer/CommandLineTools
2、安装刚刚下载的 dmg 文件
3、重新编译redis 文件
如图:
备注:
./redis-6.0.6/src/redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 \
127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005 --cluster-replicas 1
替换旧命令
./redis-trib.rb create --replicas 1 127.0.0.1:7000 127.0.0.1:7001 \
127.0.0.1:7002 127.0.0.1:7003 127.0.0.1:7004 127.0.0.1:7005
引用地址:https://stackoverflow.com/questions/63592445/ld-unsupported-tapi-file-type-tapi-tbd-in-yaml-file