You are here

MacOS Terminal DMG/PKG Installation

Error message

  • Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in drupal_strip_dangerous_protocols() (line 1458 of /home2/crephoto/public_html/techblog/includes/common.inc).
  • Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in drupal_strip_dangerous_protocols() (line 1458 of /home2/crephoto/public_html/techblog/includes/common.inc).
  • Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in drupal_strip_dangerous_protocols() (line 1458 of /home2/crephoto/public_html/techblog/includes/common.inc).

I recently found myself remotely installing/upgrading MySQL on a remote MacOS machine without GUI access. It's an old but solid PowerMac G5 running 10.5 Leopard. I couldn't remember how to do this, but a quick search provided the following solution.

The first step was mounting the disk image (dmg):

$ sudo hdiutil attach 

The volume will be mounted at /Volumes/<dmg>

Next, install the pkg file:

$ sudo installer -pkg /Volumes/<dmg>/<pkg> -target /

Lastly, cleanup:

$ sudo hdiutil detach /Volumes/<dmg>