MacOS使用make命令报错“xcrun: error”,“missing xcrun”解决办法

1.例如安装sshpass,./configure和make时报错

sshpass-1.05 % ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking for style of include used by make... none
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/Users/chenhang_vendor/sshpass-1.05':
configure: error: C compiler cannot create executables
See `config.log' for more details
sshpass-1.05 % make&&make install
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

2.安装Command Line Tools的工具(根据提示一直继续)

sshpass-1.05 % xcode-select --install
xcode-select: note: install requested for command line developer tools

3.再次检查成功,并顺利安装sshpass

sshpass-1.05 % make&&make install
/Library/Developer/CommandLineTools/usr/bin/make  all-am
gcc -DHAVE_CONFIG_H -I.     -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
mv -f .deps/main.Tpo .deps/main.Po
gcc  -g -O2   -o sshpass main.o  
test -z "/usr/local/bin" || ./install-sh -c -d "/usr/local/bin"
  /usr/bin/install -c sshpass '/usr/local/bin'
test -z "/usr/local/share/man/man1" || ./install-sh -c -d "/usr/local/share/man/man1"
 /usr/bin/install -c -m 644 sshpass.1 '/usr/local/share/man/man1'
sshpass-1.05 % sshpass
Usage: sshpass [-f|-d|-p|-e] [-hV] command parameters
   -f filename   Take password to use from file
   -d number     Use number as file descriptor for getting password
   -p password   Provide password as argument (security unwise)
   -e            Password is passed as env-var "SSHPASS"
   With no parameters - password will be taken from stdin

   -h            Show help (this screen)
   -V            Print version information
At most one of -f, -d, -p or -e should be used
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值