drxyaox153896 2019-06-28 09:14
浏览 90

在Mac OS x中构建从Dep迁移到Go模块的Go项目时出错

Go version in my local is: go1.11.2 darwin/amd64 I tried to upgrade the go version in a project which was in go1.10

These are the steps I followed:

export GO111MODULE=on

go mod init

go mod tidy

rm -rf vendor/

go build

When I tried to build I get the following error

net clang: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk' clang: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

I am running this on macOS Mojave.

After immediate googling and stack overflowing I tried xcode-select --install and xcode-select --switch /Library/Developer/CommandLineTools/ which didn't help either.

Even after upgrading software I am still facing this error. :(

However I was able to successfully build and run the go project through docker.

Any help would be most appreciated.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 matlab有关常微分方程的问题求解决
    • ¥15 perl MISA分析p3_in脚本出错
    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable