When I build Go Image with CircleCI, I get runtime/cgo: pthread_create failed: Operation not permitted
The Problem:
When building a Go image with CircleCI, you encounter the error: runtime/cgo: pthread_create failed: Operation not permitted.
The Solution:
It was determined that an architectural change in the Go image happened in mid-June. The solution was to specify a specific version of the Go image:
FROM golang:1.19.1
This resolved the error.
Additional Information:
CircleCI requires CircleCI executor to run the go mod download command. This command was unable to download modules due to an Operation not permitted. Specifying a specific version of the Go with the change in architecture and requires CircleCI to ensure it has the correct capabilities.
The above is the detailed content of How to Resolve \'runtime/cgo: pthread_create failed: Operation not permitted\' Error When Building Go Image with CircleCI?. For more information, please follow other related articles on the PHP Chinese website!