16

I'm trying to use dpkg command but in Mac OS X it doesn't seem to work for me

dpkg -scanpackages -m . /dev/null -->Packages

-bash: dpkg: command not found
dns:Administrator$ man dpkg
No manual entry for dpkg

I wonder how can I use the dpkg in Mac??

Ali
  • 9,997
  • 20
  • 70
  • 105
  • 1
    Are you looking for an equivalent packet manager in os x or do you really want to use the debian packet manager? – Sbhklr Jan 08 '12 at 17:32
  • @Lightforce I was trying to get the package for the .deb file so I can update the repo. but I thought mac also support dpkg command but that what I got in return once I input the command – Ali Jan 08 '12 at 17:35
  • @Lightforce : what is the equivalent packet manager in os x? – displayName Aug 13 '14 at 00:26
  • @displayName The most popular solutions are homebrew and macports. I personally use macports but some like homebrew better. It's a matter of taste. – Sbhklr Aug 13 '14 at 06:35

3 Answers3

31

Or homebrew Link brew install dpkg

The macports version has a lot of dependencies and takes forever.

If all you want to do is see what is in the package then unar and untar it.

ar -x package.deb

You should then have a debian-version, control.tar.gz and data.tar.gz in your current directory. The files the package would add will be in data.tar.gz. The package description will be in a file named control inside the control.tar.gz file.

tar -tvzf data.tar.gz

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
simulacre
  • 1,223
  • 8
  • 7
  • I love `brew` It is awesome :D – Ali Jul 09 '13 at 23:27
  • Getting brew on OS X 10.11 if you didn't already have it is a huge pain in the butt. First you need fink, which you can't seem to get, as the OS X installation instructions are to use `dpkg`!!! UGH – kayleeFrye_onDeck Jun 24 '16 at 21:54
  • 8
    This installation of dpkg is not configured to install software, so commands such as `dpkg -i`, `dpkg --configure` will fail. I got this error. – Venu Gopal Tewari Jan 13 '17 at 19:05
7

You will first have to install dpkg. In my opinion the easiest way to do this is to first install macports which is a high level packet manager for os x and then use macports to install dpkg.

Installing macports: http://www.macports.org/install.php

Once installed you can run sudo port install dpkg. Then you can use dpkg on the command line.

Sbhklr
  • 2,693
  • 1
  • 17
  • 20
  • This has been the only decent starting point I've found to overcome my stupid homebrew installation issue due to SSL certs >.< Get MacPorts, then Fink, then cURL, then Homebrew... seriously?! – kayleeFrye_onDeck Jun 24 '16 at 21:57
-2

"dpkg" utility can be provided by Fink.

Grant
  • 1
  • 1