• Visual Studio Code离线安装扩展失败 Corrupt ZIP: end of central directory record signature not found


    Extensions for the Visual Studio family of products

    $ wget -nv https://marketplace.visualstudio.com/_apis/public/gallery/publishers/llvm-vs-code-extensions/vsextensions/vscode-clangd/latest/vspackage
    
    $ du -sk vspackage
    1244    vspackage
    
    $ md5sum vspackage
    10f6bdb1151a954a702f8a6db6f3bd52  vspackage
    
    cmd> certutil.exe -hashfile .\vspackage MD5
    MD5 hash of .\vspackage:
    74f82f716616796157bde8008c8e5a45
    
    $mv vspackage vspackage.vsix
    
    $ code --install-extension vspackage.vsix
    Installing extensions on SSH: boozy-olive-harrier...
    Corrupt ZIP: end of central directory record signature not found
    Failed Installing Extensions: vscode-remote://ssh-remote%2Bboozy-olive-harrier/root/vspackage.vsix
    

    解决办法

    $ wget -nv https://marketplace.visualstudio.com/_apis/public/gallery/publishers/llvm-vs-code-extensions/vsextensions/vscode-clangd/latest/vspackage
    2021-02-11 09:04:22 URL:https://marketplace.visualstudio.com/_apis/public/gallery/publishers/llvm-vs-code-extensions/vsextensions/vscode-clangd/latest/vspackage [1270960/1270960] -> "vspackage"
    
    $ file vspackage
    vspackage: gzip compressed data, max speed, from FAT filesystem (MS-DOS, OS/2, NT), original size modulo 2^32 1416661
    
    $ mv vspackage vspackage.gz
    $ gunzip -v vspackage.gz
    vspackage.gz:    10.3% -- replaced with vspackage
    
    $ file vspackage
    vspackage: Zip archive data, at least v2.0 to extract
    $ mv vspackage vscode-clangd.vsix
    # 这个vscode-clangd.vsix就可以被VS Code成功安装了。
    

    Reference

    VSCode Marketplace extension: Corrupt ZIP: end of central directory record signature not found

  • 相关阅读:
    自我介绍
    秋季学期总结
    第七周编程总结
    第六周作业
    第五周编程总结
    第四周编程总结
    第三周作业
    第二周作业
    抓老鼠啊~亏了还是赚了
    币值转换
  • 原文地址:https://www.cnblogs.com/MimiSnowing/p/16140917.html
Copyright © 2020-2023  润新知