While performing an installation in Linux for a PÂM SC package which should support the version is it installing in, the following messages may be obtained
Error message :
root@xxxx:/tmp$ ./install_base
/tmp/pre_install/getvar.sh: line 2550: [: O: integer expression expected
/tmp/pre_install/getvar.sh: line 2535: [: O: integer expression expected
./install_base: line 2464: [: O: integer expression expected
This platform is not supported.
This is despite installing in a platform fully compatible with the PAM SC version being installed and its kernel
CA PAM SC 14.X
As part of the installation process the install_base script runs the getvar.sh command with different options to obtain information about the platform where the product is being installed
The getvar.sh uses the information provided in file /etc/os-release to parse the different variables
For instance, setting in trace getvar.sh one can see, for a working case, data like the following
+ '[' -f /etc/os-release ']'
++ awk -F= '/^VERSION_ID/ {print $2}' /etc/os-release
++ awk -F. '{print $1}'
++ tr -d '"'
+ OSMAJ=8
++ awk -F= '/^VERSION_ID/ {print $2}' /etc/os-release
++ awk -F. '{print $2}'
++ tr -d '"'
+ OSMIN=6
We can see that- as expected we are getting the major and minor version for the OS, etc.
However, in a non-working case, getvar.sh is obtaining other results which cause the script to believe this is a failed installation. For instance
+ '[' -f /etc/os-release ']'
++ awk -F= '/^VERSION_ID/ {print $2}' /etc/os-release
++ tr -d '"'
++ awk -F. '{print $1}'
+ OSMAJ=049-202
++ awk -F= '/^VERSION_ID/ {print $2}' /etc/os-release
++ tr -d '"'
++ awk -F. '{print $2}'
+ OSMIN=git20220511
as observed the OSMIN and OSMAJ, expected to be integer values, turn out to be text strings taking into account the parsing for file /etc/os-release
It is an incorrect or differently parsed /etc/os-release that may cause this problem to occur
/etc/os-release should be parsed in such a way that the necessary information is retrieved from it.
If this file is available in a working system in the same version and kernel level, it is possible to copy it to the machine where installation is failing
Another possibility is to use an alternate os-release file, located for instance under /usr/lib. In this last case, please do
mv /etc/os-release /var/crash/
Followed by:
ln -s /usr/lib/os-release /etc/os-release
And installation will complete fine