安装homebrew错误The operation couldn’t be completed. No such file or directory Done.

一位MacOS Mojave用户在使用官网最新版本的Homebrew进行安装时遇到错误,详细记录了安装过程中的代码及错误信息,主要问题是CommandLineTools安装失败及xcode-select命令出错。

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

本人小白,不懂如何解决,麻烦各位前辈指点一二,谢谢。

电脑系统:macOS Mojave 10.14.3

安装homebrew用的是官网最新版本,下面是安装时的代码。

Last login: Fri Mar 1 08:51:08 on console
bogon:~ jinzesu$ /usr/bin/ruby -e “$(curl -fsSL https://raw.githubusercontent…)”
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The Xcode Command Line Tools will be installed.

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/mkdir -p /Users/jinzesu/Library/Caches/Homebrew
Password:
==> /usr/bin/sudo /bin/chmod g+rwx /Users/jinzesu/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown jinzesu /Users/jinzesu/Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools (macOS Mojave version 10.14) for Xcode-10.1
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command Line Tools (macOS Mojave version 10.14) for Xcode-10.1
Software Update Tool

Downloading Command Line Tools (macOS Mojave version 10.14) for Xcode
Error downloading Command Line Tools (macOS Mojave version 10.14) for Xcode: The operation couldn’t be completed. No such file or directory
Done.

Error downloading updates.
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
xcode-select: error: invalid developer directory ‘/Library/Developer/CommandLineTools’
Failed during: /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值