【问题标题】:How to run nuget on Mac osx如何在 Mac osx 上运行 nuget
【发布时间】:2015-06-28 18:43:13
【问题描述】:

我正在尝试在我的 Mac os x 山狮上的 monodevelop 中打开一个 Windows 编译的 c# 解决方案,并且该解决方案中包含 nuget 包。

当我尝试编译时出现以下错误:

var/folders/bk/sqxq4pw50lsb807cw8x865gc0000gn/T/tmp4586d973.tmp: 
line 1: wget: command not found
/Users/(my name)/Downloads/SteamBot-master/.nuget/NuGet.targets: 
error : Command 'mozroots --import 
--sync;wget -O '/Users/(my name)/Downloads/SteamBot-master/.nuget/NuGet.exe'https://nuget.org/nuget.exe' 
exited with code: 127.
Task "Exec" execution -- FAILED

我应该怎么做才能让它工作?

【问题讨论】:

    标签: c# mono steambot


    【解决方案1】:
    line 1: wget: command not found
    

    错误是关于“wget”不存在。 OS-X 没有开箱即用的 'wget'(它有 curl)。

    使用homebrew(我的最爱):

    > brew install wget
    

    或使用MacPorts:

    > sudo port wget
    

    或者从source手动安装

    在您可以执行“which wget”或“wget --version”并获得有效回复后,再次尝试构建您的项目。

    【讨论】:

    • 我有同样的问题,我尝试安装 wget,当我输入 wget --version 时我得到了有效的回复,但我仍然收到 command not found 错误。怎么办?
    • 我克隆了那个 repo 并在我的 mac 上尝试过,对我来说不同的问题,因为为 ci 定义了自定义 nuget 目标并且它缺少脚本 (.ci/exec-with-retry.sh) .我会在 github 上发布一个问题。
    • 我试过你的答案,我得到了同样的错误。执行重试的事情。怎么办
    • 我只会从 nuget 目标中删除该自定义 exec,假设它仅用于 CI,本地构建并不真正需要
    • 我尝试这样做,但遇到了另一个错误。一个不同的。我可以通过 PM 联系您吗?
    猜你喜欢
    • 1970-01-01
    • 2019-06-15
    • 2011-04-05
    • 2018-05-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-07-14
    • 1970-01-01
    相关资源
    最近更新 更多