如何在没有监控器的情况下安装OSX开发人员工具?

时间:2016-11-14 07:56:17

标签: python macos

我可以使用ssh访问OSX机器,但我无法触摸它,没有桌面和VNC。

当我使用pip install gevent时,它引发了一个错误说

xcode-select: error: no developer tools were found at '/Applications/Xcode.app', and no install could be requested (perhaps no UI is present), please install manually from 'developer.apple.com'.
    error: command 'cc' failed with exit status 1

我想知道是否可以使用ssh安装OSX开发人员工具。

由于

1 个答案:

答案 0 :(得分:3)

您可以直接从开发者页面获取命令行工具。        http://adcdownload.apple.com/Developer_Tools/Command_Line_Tools_macOS_10.12_for_Xcode_8.1/Command_Line_Tools_macOS_10.12_for_Xcode_8.1.dmg

然后

sudo hdiutil attach Command_Line_Tools_macOS_10.12_for_Xcode_8.1.dmg
sudo installer -package /Volumes/<mount_point>/<installer>.pkg -target /
sudo hdiutil detach /Volumes/<mount_point>
相关问题