bunzip2 in which versions of MacOSX

Posted:
in macOS edited January 2014
Hello all,



I'm releasing a piece of software for MacOSX and would like to use bunzip2 in it. I would like to know if I can rely on these being installed in which versions of MacOS. Can someone tell me specifically if all versions of Leopard and Snow Leopard will have bunzip2 in them? Does anyone know about older versions as well? If bunzip2 isn't/wasn't widely available, I could go with gunzip if anyone knows about its availability. Thanks!

Comments

  • Reply 1 of 2
    emacs72emacs72 Posts: 356member
    Quote:
    Originally Posted by jgrauman View Post


    Hello all,



    I'm releasing a piece of software for MacOSX and would like to use bunzip2 in it. I would like to know if I can rely on these being installed in which versions of MacOS. Can someone tell me specifically if all versions of Leopard and Snow Leopard will have bunzip2 in them?



    bzip2 isn't standard on MacOS. your app should be able to run



    pkgutil --pkgs | grep bzip2



    from the command line and parse the result(s) to see whether bzip2 is installed
  • Reply 2 of 2
    Quote:
    Originally Posted by emacs72 View Post


    bzip2 isn't standard on MacOS. your app should be able to run



    pkgutil --pkgs | grep bzip2



    from the command line and parse the result(s) to see whether bzip2 is installed



    bzip2 is standard on 10.6, and is in my 10.5.8 image as well (nothing but updates there). So, yes, it is standard.



    And you have the pkgutil command a bit confused, your example is only going to show the names of packages that you have installed. If "bzip2" was not in the name of the package (it is not), then you would not get any result. The proper commands to use would be:

    Code:


    whereis bzip2

    pkgutil --file-info /usr/bin/bzip2





    Which will tell you that it is part of the com.apple.pkg.BSD package, as well as having been updated by com.apple.pkg.update.os.10.6.3.patch.
Sign In or Register to comment.