使用MacPort安装软件报错解决

博客介绍了Xcode命令行工具的安装方法。先在终端执行xcode - select --install,已安装会有提示,未安装则弹出窗口输入密码安装。安装完成后,依次执行sudo xcode - select - switch /Applications/Xcode.app、which xcodebuild和/usr/bin/xcodebuild,最后出现了相关错误提示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

报错:
ash-3.2$ sudo port install wget
Password:
Warning: xcodebuild exists but failed to execute
Warning: configured user/group adm does not exist, will build as root
Warning: Xcode appears to be installed but xcodebuild is unusable; some ports will likely fail to build.
Warning: You may need to run `sudo xcode-select -switch /Applications/Xcode.app`
--->  Computing dependencies for wget

解决方式:

1、打开终端,执行:

xcode-select --install

若是已安装会提示xcode-select: error: command line tools are already installed, use "Software Update" to install updates。

若未安装,则会弹出安装窗口,输入密码安装即可。

2、待安装完成,在终端执行:

sudo xcode-select -switch /Applications/Xcode.app

3、在终端执行:

which xcodebuild

提示:/usr/bin/xcodebuild

在终端执行

/usr/bin/xcodebuild

提示:error: can't exec '/Developer/usr/bin/xcodebuild' (No such file or directory)

xcode-select。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值