I was trying to uninstall/re-install the latest beta on Solaris 12/11.4 and "pkgrm SUNWvbox" fails with the errors below.

To me it looks like the errors are related to the version changes, modifying the below helped me as a workaround to uninstall, but the new install will still fail. most probably related due to similar error checks in the post install script.

Modifying STR_KERN_MAJOR worked for me as a workaround to uninstall, but I now can't re-install (any version) even the beta, since I cant modify the install pkg version checks.--------------------------modifying line 271 in /opt/VirtualBox/vboxconfig.sh like the below will allow the uninstall to continue.----From#STR_KERN_MAJOR=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\,.*//'`ToSTR_KERN_MAJOR="5.12"-----

Below are the failed messages---pkgrm SUNWvbox

The following package is currently installed: SUNWvbox Oracle VM VirtualBox (i386) 5.1.26,REV=2017.07.27.13.56.117224