Install dmg package on MAC OS from Terminal

后端 未结 4 1092
孤独总比滥情好
孤独总比滥情好 2021-02-09 01:33

I would like to install the dmg java package in my MAC OS through the terminal

I tried using this command:

sudo installer -package jdk-7u51-macos-x64.dmg         


        
4条回答
  •  长发绾君心
    2021-02-09 02:26

    Thank Mateusz Szlosek,

    For me :

    $ MOUNTDIR=$(echo `hdiutil mount /Users/valorisa/Downloads/VirtualBox\ 5.0.14\ Build\ 105127
    /VirtualBox-5.0.14-105127-OSX.dmg | tail -1 | awk '{$1=$2=""; print $0}'` | xargs -0 echo) 
    && sudo installer -pkg "${MOUNTDIR}/"*.pkg -target /
    
    Password:
    installer: Package name is Oracle VM VirtualBox
    installer: Upgrading at base path /
    installer: The upgrade was successful.
    

    Valorisa

提交回复
热议问题