After starting the oimws service, the connection to port 10003 still failed. Checking the mage log, the full text is as follows:
EROR [2024-06-12 09:24:19.210] [responder.go:31] msg="sendOnErrorResp" operationID="gmm9kk5be31718155459046" event="Login" err="init database ==> github.com/openimsdk/openim-sdk-core/v3/pkg/db.NewDataBase()@88: initDB failed _output/db: ==> github.com/openimsdk/openim-sdk-core/v3/pkg/db.(*DataBase).initDB()@116: open db failed /root/oimws/_output/bin/platforms/linux/arm64/_output/db/OpenIM_v3_252817.db: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub: 10006 SdkInternalError"
This issue is due to the 'CGO_ENABLED=0' setting in go env.
Solution:
Enter the following commands in the terminal:
export CGO_ENABLED=1
apt-get update
apt-get install gcc
Check with:
go env | grep CGO_ENABLED
mage
mage start
After starting the oimws service, the connection to port 10003 still failed. Checking the mage log, the full text is as follows: EROR [2024-06-12 09:24:19.210] [responder.go:31] msg="sendOnErrorResp" operationID="gmm9kk5be31718155459046" event="Login" err="init database ==> github.com/openimsdk/openim-sdk-core/v3/pkg/db.NewDataBase()@88: initDB failed _output/db: ==> github.com/openimsdk/openim-sdk-core/v3/pkg/db.(*DataBase).initDB()@116: open db failed /root/oimws/_output/bin/platforms/linux/arm64/_output/db/OpenIM_v3_252817.db: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub: 10006 SdkInternalError"
This issue is due to the 'CGO_ENABLED=0' setting in go env.
Solution: Enter the following commands in the terminal: export CGO_ENABLED=1 apt-get update apt-get install gcc
Check with: go env | grep CGO_ENABLED mage mage start
I hope this issue can help everyone.