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

关于将tar、gcc等Ubuntu软件包打包为Zip文件并下载的技术咨询

关于将tar、gcc等Ubuntu软件包打包为Zip文件并下载的技术咨询

Hey there! I get that you're trying to grab packages like tar and gcc as zip files—let me break down how to do this, since Ubuntu's official repos don't offer them directly in zip format.

Method 1: Download individual packages & zip them up

If you only need the main packages (not all their dependencies), follow these steps:

  • First, use the apt download command to fetch the .deb package files (this is Ubuntu's native package format) directly to your current directory:
    apt download gcc
    apt download tar
    
    Note: You might need to run this with sudo if you hit permission issues.
  • Once the .deb files are downloaded, use the zip command to bundle them into a single zip archive:
    zip ubuntu_packages.zip gcc*.deb tar*.deb
    
    This will create a file named ubuntu_packages.zip containing both packages.

Method 2: Download packages + all dependencies (for offline use)

If you need the full set of files required to install these packages offline (including all dependent libraries), here's what to do:

  • Use apt-get with the --download-only flag to download all required .deb files without installing them:
    sudo apt-get install --download-only gcc tar
    
  • All the downloaded .deb files will be stored in /var/cache/apt/archives/. Navigate to that directory and zip everything up:
    cd /var/cache/apt/archives/
    zip ~/full_ubuntu_packages.zip *.deb
    
    The zip file will be saved to your home directory (~/) for easy access.

For non-Ubuntu systems

If you're not on Ubuntu but still want to grab these packages, you can manually locate the .deb files in Ubuntu's package repository structure. Once you've downloaded the relevant .deb files, just use your system's zip tool to bundle them into a zip archive like we did above.

备注:内容来源于stack exchange,提问作者Hareshkumar

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.22 12:34:29