macos Mac 上 -dpkg 的替代品是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/8779597/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is alternative to -dpkg for Mac?
提问by Ali
I'm trying to use dpkg command but in Mac OS X it doesn't seem to work for me
我正在尝试使用 dpkg 命令,但在 Mac OS X 中它似乎对我不起作用
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??
我想知道如何在 Mac 中使用 dpkg ?
回答by simulacre
Or homebrew http://mxcl.github.com/homebrew/brew install dpkg
或者自制软件http://mxcl.github.com/homebrew/brew install dpkg
The macports version has a lot of dependencies and takes forever.
macports 版本有很多依赖项并且需要很长时间。
If all you want to do is see what is in the package then unar and untar it.
如果您只想查看包中的内容,请 unar 并解压它。
ar -x package.deb
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.
然后,您的当前目录中应该有 debian-version、control.tar.gz 和 data.tar.gz。包将添加的文件将在 data.tar.gz 中。包描述将在 control.tar.gz 文件中名为 control 的文件中。
tar -tvzf data.tar.gz
tar -tvzf data.tar.gz
回答by Sbhklr
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.
您首先必须安装 dpkg。在我看来,最简单的方法是首先安装 macports,它是 os x 的高级数据包管理器,然后使用 macports 安装 dpkg。
Installing macports: http://www.macports.org/install.php
安装 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.
安装后就可以运行了sudo port install dpkg
。然后就可以dpkg
在命令行上使用了。