You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用curl下载protoc压缩包后执行unzip命令失败的问题排查

问题:curl下载protoc压缩包后unzip解压失败

环境:Macbook Pro(macOS Big Sur 11.6.8),正在学习Golang结合gRPC的使用,按照《Protocol Buffer Compiler Installation》页面指引执行以下命令:

curl -LO https://github.com/protocolbuffers/protobuf/releases/protoc-21.4-osx-universal_binary.zip
unzip protoc-21.4-osx-universal_binary.zip -d /Users/rodrigosilveira/.local

执行unzip命令时失败,报错信息如下:

Archive:  protoc-21.4-osx-universal_binary.zip
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.
unzip:  cannot find zipfile directory in one of protoc-21.4-osx-universal_binary.zip or
        protoc-21.4-osx-universal_binary.zip.zip, and cannot find protoc-21.4-osx-universal_binary.zip.ZIP, period.

调试说明

  • 手动下载后解压正常
    • 访问《Protocol Buffers v21.4》页面
    • 点击下载protoc-21.4-osx-universal_binary.zip文件
    • 在本地Downloads文件夹中使用unzip解压该压缩包可成功
  • Stack Overflow相关回答无法解决问题
    • 已查阅多个相关Stack Overflow问题,但均未解决当前问题

内容的提问来源于stack exchange,提问作者Rodrigo Silveira

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.22 18:24:04