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.
Code: Select all
pkgadd -d VirtualBox-5.2.0_BETA2-SunOS-amd64-r117563.pkg
... [snip]
[ verifying class <manifest> ]
## Executing postinstall script.
Checking for older bits...
## Failed to parse the Solaris kernel major version.
## ERROR!! Failed to remove older/partially installed bits.
pkgadd: ERROR: postinstall script did not complete successfully
Installation of <SUNWvbox> failed.
Code: Select all
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/\,.*//'`
To
STR_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
Do you want to remove this package? [y,n,?,q] y
## Removing installed package instance <SUNWvbox>
(A previous attempt may have been unsuccessful.)
This package contains scripts which will be executed with super-user
permission during the process of removing this package.
Do you want to continue with the removal of this package [y,n,?,q] y
## Verifying package <SUNWvbox> dependencies in global zone
## Processing package information.
## Executing preremove script.
Removing VirtualBox services and drivers...
## Failed to parse the Solaris kernel major version.
## Failed.
pkgrm: ERROR: preremove script did not complete successfully
Removal of <SUNWvbox> failed.
------
/opt/VirtualBox/vboxconfig.sh
... [snip]
+ cut -f1,2 -d.
+ cut -f2 -d-
+ HOST_OS_MAJORVERSION=11.4
+ test x11.4 '=' x5.12
+ errorprint 'Failed to parse the Solaris kernel major version.'
+ echo '## Failed to parse the Solaris kernel major version.'
+ 1>& 2
## Failed to parse the Solaris kernel major version.
+ exit 1
## Failed.
Thanks in advance,
Eli