标签:mat lang proxy xxx auto 过程 prefix erro 缓存
编译的过程中出现了一个吓人的错误:
GOROOT=C:\Go #gosetup
GOPATH=C:\Users\ahfuzhang\go #gosetup
C:\Go\bin\go.exe mod tidy #gosetup
go: downloading github.com/xxx/my_prj/public v0.0.14
github.com/xxx/my_prj/proxy_alloc_svr/cmd imports
github.com/xxx/my_prj/public/pkg/base: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
github.com/xxx/my_prj/proxy_alloc_svr/cmd imports
github.com/xxx/my_prj/public/pkg/config: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
github.com/xxx/my_prj/proxy_alloc_svr/cmd imports
github.com/xxx/my_prj/public/pkg/middleware: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
github.com/xxx/my_prj/proxy_alloc_svr/cmd imports
github.com/xxx/my_prj/public/pkg/utils: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
github.com/xxx/my_prj/proxy_alloc_svr/internal/endpoint/proxy imports
github.com/xxx/my_prj/public/pkg/defines: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
github.com/xxx/my_prj/proxy_alloc_svr/internal/endpoint/proxy imports
github.com/xxx/my_prj/public/pkg/policy: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
github.com/xxx/my_prj/proxy_alloc_svr/pkg/filter imports
github.com/xxx/my_prj/public/pkg/dao/proxy: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
github.com/xxx/my_prj/proxy_alloc_svr/pkg/utils imports
github.com/xxx/my_prj/public/pkg/filter/tree: git -c core.autocrlf=input -c core.eol=lf archive --format=zip --prefix=prefix/ d57403125286a6411e73163e184e2a88188a448d in C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49: exit status 255:
error: invalid object 100644 4994770929b65b148f8d80e1ef0be9b50b9cc6c5 for ‘pkg/defines/proxy.go‘
error: cannot read 4994770929b65b148f8d80e1ef0be9b50b9cc6c5
完全没有头绪。
尝试着删除临时目录后正常:
rm -fdr "C:\Users\ahfuzhang\go\pkg\mod\cache\vcs\1ae7172f3810140ab493892af4f3912f9d17b329d60308cecebd171197322c49"
【解决了一个小问题】golang build中因为缓存文件损坏导致的编译错误
标签:mat lang proxy xxx auto 过程 prefix erro 缓存
原文地址:https://www.cnblogs.com/ahfuzhang/p/14714764.html