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

无需dpkg工具在MacOS High Sierra中打开Debian deb包

How to Extract a Debian .deb Package on macOS High Sierra

Got it, let's figure this out for you. Debian .deb packages aren't standard tar or zip archives—they're actually ar-format archives with a specific internal structure, which is why tar and unzip aren't working. Here's how to extract the contents (and get to those binary files you need to compare) on macOS High Sierra, using both command line and GUI methods:

Command Line Methods

Option 1: Use macOS's built-in ar tool

macOS comes with the ar command preinstalled, which can handle the ar-format structure of .deb packages:

  • Open Terminal and navigate to the folder where your mssql-server_14.0.3008.27-1_amd64.deb file is stored.
  • Run this command to extract the core components of the package:
    ar x mssql-server_14.0.3008.27-1_amd64.deb
    
    This will create three files in your current directory:
    • debian-binary: A plain text file with the package format version
    • control.tar.gz: Contains package metadata and setup scripts
    • data.tar.xz (or data.tar.gz, depending on the package): This is the archive holding all the actual binary files and system files you care about.
  • Next, extract the data archive. If it's .xz compressed, use:
    tar xJf data.tar.xz
    
    If it's .gz compressed, use:
    tar xzf data.tar.gz
    
    You’ll now have a directory structure matching what would be installed on a Linux system, with all the binaries ready for comparison.

Option 2: Install dpkg via Homebrew for simpler extraction

If you have Homebrew installed (a popular package manager for macOS), you can use dpkg (the official Debian package tool) to extract the .deb directly into a clean, organized folder:

  • Install dpkg if you don’t already have it:
    brew install dpkg
    
  • Extract the package to a target directory (replace ./mssql-extracted with any path you prefer):
    dpkg-deb -x mssql-server_14.0.3008.27-1_amd64.deb ./mssql-extracted
    
    This will automatically unpack all binary files into the same directory hierarchy they use on Linux, so you can jump straight into comparing with your installed version.

GUI Method (No Terminal Needed)

If you prefer a graphical approach, The Unarchiver (a free, widely used macOS app) supports .deb files out of the box:

  1. Download and install The Unarchiver from the Mac App Store.
  2. Right-click your .deb file, select "Open With" > "The Unarchiver".
  3. Choose a destination folder, and the app will extract all contents (including the binary files from the data archive) for you to browse.

内容的提问来源于stack exchange,提问作者Rui F Ribeiro

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 07:54:05