Go build packaging Error:
TARGET_OS_MAC & IOMasterPort
#github.com/shirou/gopsutil/cpu
../../../../go/pkg/mod/github.com/shirou/[email protected]+incompatible/cpu/cpu_darwin_cgo.go:13:5:
warning: 'TARGET_OS_MAC' is not defined, evaluates to 0 [-Wundef-prefix=TARGET_OS_]
#github.com/shirou/gopsutil/disk
iostat_darwin.c:28:2:
warning: 'IOMasterPort' is deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:132:1:
note: 'IOMasterPort' has been explicitly marked deprecated here
I don’t know the cause of the problem at present. It may be caused by the upgrade of the MAC system
My version is MacOS Monterey 12.3
Solution (not necessarily effective)
Modify CGO_ENABLED,default is CGO_ENABLED="1"
go env -w CGO_ENABLED="0"
Read More:
- How to Solve Cocoapods Installation Failure
- Cocoapods Upgrade Error: ffi * * * * [How to Solve]
- [Solved] Executing npm install error: npm ERR! code EINTEGRITY
- [Solved] error: failed to run custom build command for `librocksdb-sys v6.17.3`
- [Solved] cocopod Error: failed: undefined method `map‘ for nil:NilClass
- Mac Start IDEA Error: Cannot load JVM bundle…Value of IDEA_VM_OPTIONS is (null)
- Cocoapods Install ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.
- Error: Your CLT does not support macOS 11.6 [How to Solve]
- [Solved] Mac homebrew error: Error: homebrew-core is a shallow clone.
- [Solved] Go Get Download Dependency Error: is not using a known version control system
- [Solved] Android Studio Compile Error: Could not determine java version from ‘11.0.8‘.
- Error. Onload failed when ‘rjava’ was calculated in loadnamespace()
- Yolox_s.pth Convert to tensorRT Error: AttributeError: ‘tensorrt.tensorrt.Builder‘ object has no attribute ‘max_workspace_size‘
- Docker run Error: container_linux.go:235: starting container process caused “process_linux.go:258: appl
- error: src refspec master does not match any. [How to Solve]
- Golang Error: go get github/xxx [How to Fix]
- [Solved] Pip install icu failed: Command “python setup.py egg_info” failed with error code 1 in
- How to Solve brew ERROR in `initialize‘: Version value must be a string; got a NilClass ()
- Tensorflow GPU error (4 Type Error and their Solutions)
- [Solved] Git Clone Error: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version