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