douchushao7799 2011-07-04 01:14
浏览 32
已采纳

在OSX上安装Go调试器

After installing go, I got the following lines:

On OS X the debuggers must be installed setgrp procmod. Read and run ./sudo.bash to install the debuggers.

Sorry for the beginner question, but what exactly does this mean? What do I have to do to install the debuggers?

I ran ./sudo.bash but nothing happened. Am I reading this too literally?

  • 写回答

1条回答 默认 最新

  • dongmiao520892 2011-07-04 01:44
    关注

    In theory, you simply do as you did, and it copies the binaries from the build area to /usr/local/bin and then makes them belong to group procmod and SetGID.

    Consider running:

    sh -x sudo.bash
    

    That should show you what it is doing as it does it.

    I don't entirely agree with what that script does; I want the Go debuggers not in /usr/local/bin, thank you, but under $GOROOT, so I don't use the official sudo.bash but instead created my own sudo.bash.goroot which contains:

    #!/usr/bin/env bash
    # Copyright 2009 The Go Authors. All rights reserved.
    # Use of this source code is governed by a BSD-style
    # license that can be found in the LICENSE file.
    
    set -e
    . ./env.bash
    
    case "`uname`" in
    Darwin)
        ;;
    *)
        exit 0
    esac
    
    for i in prof cov
    do
        sudo cp "$GOROOT"/src/cmd/$i/6$i $GOROOT/bin/6$i
        sudo chgrp procmod $GOROOT/bin/6$i
        sudo chmod g+s $GOROOT/bin/6$i
    done
    

    That works fine for me.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 MATLAB中streamslice问题
  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端