今天运行程序出现了很多问题
go: -i flag is deprecated
# express/src/ethereum-oracle-server/offchainABAC
..ethereum-oracle-serveroffchainABACpermission.go:80:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACpermission.go:97:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACpermission.go:113:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase1.go:72:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase1.go:107:10: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase2.go:60:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase3.go:59:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase3.go:94:10: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase4.go:54:11: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase4.go:84:10: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase4.go:84:10: too many errors
# github.com/ethereum/go-ethereum/metrics
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricscounter.go:118:15: undefined: atomic.Int64
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricscounter_float64.go:119:19: undefined: atomic.Uint64
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricscounter_float64.go:147:35: undefined: atomic.Uint64
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricsewma.go:78:19: undefined: atomic.Int64
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricsgauge.go:104:15: undefined: atomic.Int64
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricsgauge_float64.go:89:19: undefined: atomic.Uint64
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricsmeter.go:104:40: undefined: atomic.Int64
........pkgmodgithub.comethereumgo-ethereum@v1.11.6metricsmeter.go:172:21: undefined: atomic.Bool
note: module requires Go 1.19
# github.com/ethereum/go-ethereum/crypto/secp256k1
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
Compilation finished with exit code 2
先来解决第二个报错问题
末尾提示我
note: module requires Go 1.19
要求版本:
本地版本:
解决方案:升级go版本下载网址:go语言中文网
https://studygolang.com/dl?id=2&id=15&id=0&id=8&adinfo678=baidu&adinfo678=baidu%3Epage=%3E
解压到旧文件夹所在位置
完成后查看版本,升级成功
再次运行
第二个错误消失
go: -i flag is deprecated
# express/src/ethereum-oracle-server/offchainABAC
..ethereum-oracle-serveroffchainABACpermission.go:80:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACpermission.go:97:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACpermission.go:113:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase1.go:72:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase1.go:107:10: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase2.go:60:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase3.go:59:12: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase3.go:94:10: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase4.go:54:11: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase4.go:84:10: assignment mismatch: 2 variables but casbin.NewEnforcer returns 1 value
..ethereum-oracle-serveroffchainABACphase4.go:84:10: too many errors
# github.com/ethereum/go-ethereum/crypto/secp256k1
cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
Compilation finished with exit code 2
服务器托管,北京服务器托管,服务器租用 http://www.fwqtg.net
机房租用,北京机房租用,IDC机房托管, http://www.e1idc.net